Account created on 6 September 2009, almost 16 years ago
#

Recent comments

🇳🇱Netherlands johnv

The fix Will be in the 2.1.x branch. Will that be a problem for you?
Please update to latest version.

🇳🇱Netherlands johnv

Hmm, we do not get any further.
You save the entity, then set the field name and create a transition.
It seems the field is not defined yet in the entity. Can you find out in which lin of code the error occurs?
I could/should add exceptions?

🇳🇱Netherlands johnv

Committed.
Also added schema and config.

Also added some 'details' sections for the Notification Form.

🇳🇱Netherlands johnv

Committed. The base code needed some preparations to accept your code nicely.

You will need to upgrade to Workflow 2.1.6
Please test thoroughly - not all use cases are handled nicely.
For instance, I changed your 'smaller then date' to a 'between dates', since the job will run once a day.

🇳🇱Netherlands johnv

Hmm, we do not get any further.
You save the entity, then set the field name and create a transition.
It seems the field is not defined yet in the entity. Can you find out in which lin of code the error occurs?
I could/should add exceptions?

🇳🇱Netherlands johnv

A new version has been released

🇳🇱Netherlands johnv

I guess the mail or SMS service should/could save the sent message, too.

🇳🇱Netherlands johnv

This needs to be rerolled for the new version.

🇳🇱Netherlands johnv

This needs to be rerolled for the new version.

🇳🇱Netherlands johnv

Vesion 2.1.5 is now released. Also a dev branch 2.1.x

🇳🇱Netherlands johnv

Version 2.1.5 is now released. Happy testing and using!

🇳🇱Netherlands johnv

This commit moves code better to the abstract class and fixes some issues in VBO views.

🇳🇱Netherlands johnv

@golubovicm, is your problem solved, too?

🇳🇱Netherlands johnv

Nice,
ITMT, I managed to create a 2.1.x version, which is now the actual one.
Working on 1 issue, then will create a new version. Will keep you posted, and leave tis open as a reminder until then.

🇳🇱Netherlands johnv

The above patch filters the 'roles', so that no values '0' are saved (for unselected roles - which causes mentioned error)
Also, the 'days_to_trigger' validation is moved (together with above roles) to the WorkflowAbstractcNotification::save() function, so that it is checked upon save, whatever the source.

🇳🇱Netherlands johnv

There must be an update not executed.

what does the following report say: /drupal/admin/reports/status#error

please apply the patch and see what happens.

🇳🇱Netherlands johnv

Please use 2.0.x dev version.
Or New 2.1.x branche.
The 2.1.4 version does not contain this fix, yet.

🇳🇱Netherlands johnv

In the mean time, thisis added to the code base.
Thanks all

🇳🇱Netherlands johnv

Pff,
first some complaints.
- Drupal form handling is way too difficult, and uses too many conventions (null vs NULL, '?TYPE' vs. '|null', etc.
- Why does ECA module load and perform all those configuration form upfront??
- Why does Gin theme mess around with existing forms?

But then the bright side:
- this issue reveals a regression error where the 'action buttons' are no longer suppressed in the Workflow Action configuration form.
- this issue forced me to make a step further: until now, for adding the WorkflowTransition form element, I called a complete form. Now, I still do not the ideal situation (calling a proper widget), but call only the form element building thing, without loading the complete form surroundings.
(In v1.7, many code was coded and executed twice)

This may lead me to remove more duplicate code in the future.

Thanks,
Please test 2.0.x and report back.

🇳🇱Netherlands johnv

Made better readable links in OP, using [ # <number> ] format.

🇳🇱Netherlands johnv

Thanks Daniel,
Your screendumps reveal the key issue. You are using the Gin theme, or a subtheme.

That does a strange thing with Form buttons.

Also, i think you have 'action buttons' specified in one or all of your workflows.

Please confirm both assumptions.

Now I can reproduce the error.

Perhaps the following must be reviewed in this context: Support Gin action item Active

🇳🇱Netherlands johnv

On the other hand, I think you know better where the beef is.
Leaving it up to you to add a patch with only the translation part.
Also, perhaps 🐛 Error upon Translate Workflow Notification message Active is related.

🇳🇱Netherlands johnv

Please give a test script how to reproduce ther problem.

🇳🇱Netherlands johnv

This was a comment of mine from years ago.
There is no benefit now to change this.
Removing the @todo comment.

🇳🇱Netherlands johnv

Thanks,
I have a hard time to understand and test the patch at this moment. So will do some other moment.

🇳🇱Netherlands johnv

I guess this is still valid for 3.0.x version.

🇳🇱Netherlands johnv

The attached patch does not only check if the state changes, but also for other (attached) fields in the $transition.
I think it is up to the custom project to for instance fill such a attached field if a node field is changed.

🇳🇱Netherlands johnv

I am not sure, but I think the current 3.0.x code already contains an id. Please check and re-open if this is not as desired.

🇳🇱Netherlands johnv

As a co-maintainer, I just now encounter your extensive patch.
Thanks a lot.
As it happens, I just finished the re-factoring of the module myself, by extending the separate WorkflowNotification and WorkflowSmsNotify Classes, and create a WorkflowAbstractNotification parent classe for all common code.

Regarding your translation functionality, I will try to deduct from the MR.

🇳🇱Netherlands johnv

Do you have some code examples?
At the moment, version 3.0 gives messages on the screen and also in page /admin/reports/dblog

🇳🇱Netherlands johnv

Hi, It has been a long time!
I added many changed to the 3.0.x code base in [#i3534202] and issues from the same date.
Can you check and create a new version?
ITMT I will go through the issue queue.

🇳🇱Netherlands johnv

I guess this is outdated. if the problem still persists please reopen the issue.

🇳🇱Netherlands johnv

ANd if the problem persists, please give details testscript. How is the 'transition' programmed?

🇳🇱Netherlands johnv

Please try with newest versions of Workflow 2.1 and WorkflowNotification 3.0.x

🇳🇱Netherlands johnv

Thisis fixed in the mean time in v3.0.x. Thanks.
WorkflowNotification::loadMultipleByProperties() now always returns an array.

🇳🇱Netherlands johnv

Indeed, the hook_entity_insert() was missing in both submodules.
Fixed in 3.0.x

🇳🇱Netherlands johnv

This was because of a fault commit in Workflow module.

🇳🇱Netherlands johnv

This is now fixed in the current v3 version.

🇳🇱Netherlands johnv

I guess this old ticket can be closed.
The current v3 code does check for a 'state change'.

🇳🇱Netherlands johnv

In the current dev version, this does not happen anymore, since the function WorkflowNotification::loadByProperties() now always returns an array, even when nothing is found.

🇳🇱Netherlands johnv

the module files are now stripped as much as I can.
Some functions are remaining, because I cannot test them, or cannot be moved into a Notification object, due to the calling context.

🇳🇱Netherlands johnv

There are still some issues left in the phpcs, phpstan checks, but I leave that for the original developer team.

🇳🇱Netherlands johnv

The create() function as in your code works as expected in my system. I released v2. 1.4, but that should not make a difference.

The WID should be deducted from the SID.
Does the entity have that field name?
Do you have multiple workflows per entity?
Can you debug the function?

🇳🇱Netherlands johnv

@golubovicm, easel share you use case.
It seems you are using the action, but Op is not about using the actions. Only having them causes the problem.

🇳🇱Netherlands johnv

I now see thisis possible with gitlab:
- https://lostcarpark.com/drupal/future-proofing-your-module-and-dependenc...
But it requires phpunit tests for full code coverage, and that is missing in my modules.

🇳🇱Netherlands johnv

(Very late comment)
I use the version as follows: It is the version in which the problem appears last. The following release is the release that contains the fix.
Please use 2.1.x

🇳🇱Netherlands johnv

The commits adds compatibility to D11.2 and W2.1.
It also contains general code style improvements, and some cosmetic changes.

🇳🇱Netherlands johnv

This issue has been bugging me for years.
I now have decided to change the error message in WorkflowConfigTransitionRoleForm.php
from 'Please give the author permission to go from %creation to at least one state!'
to 'At least one role must have permission to go from %creation to another state.'

The patch also unifies the usasge of 'Author' vs 'author'.

🇳🇱Netherlands johnv

Please try again with version 2.0.x-dev and both report back.

The warning is now removed and replaced by a switchable field description.
Also, a NULL was passed to Twig, where only (empty) strings are allowed.

🇳🇱Netherlands johnv

Please find attached a new version, after also having tested the 'WorkflowFieldValue' condition.

Some remarks:
- The 'WorkflowHasField' condition is not tested yet.
- The buildConfigurationForm from the Event is removed. IMO events have no configuration
- The buildConfigurationForm from the Condition - I do not understand how the UI gets its values. The code has no default values, but the UI has.
- There are some @todo's.

Sorry for not using MR.

🇳🇱Netherlands johnv

I am now upgrading and testing the Workflow ECA module in 📌 Adapt to upcoming 1.9 release of Workflow Active .
Are you using that submodule, too?

With current Workflow DEV version and the patch, I can save and execute an ECA event + action.
Still working on the Condition - the Workflow ECA module must be .

The new message 'You have multiple' is intentional, but never used in this context.

Sorry to hear that the Actions problem is not solved. It should have been solved in workflow_update_8008(). I presume you did proper update.php. Can you re-run workflow_update_8008() again?

Production build 0.71.5 2024