- Issue created by @drupaluser2017
- Status changed to Closed: duplicate
almost 2 years ago 8:03am 7 September 2023 - 🇩🇪Germany jurgenhaas Gottmadingen
This is not an ECA issue, it's caused by a Drupal core bug. This issue is a duplicate of 💬 Drupal core workflows not working for me Fixed and can be resolved by patching core with this patch from 🐛 Wrong revision can be loaded into original in \Drupal\Core\Entity\EntityStorageBase::doPreSave Needs work . The "official" core fix in Drupal 11 will be different from that referenced one, but for now, there shouldn't be a reason not to use that workaround fix in Drupal 9 or 10.
- 🇮🇳India drupaluser2017 Bangalore
Sorry but patch did not work for me. I am using workflow → module not core workflows.
- 🇩🇪Germany jurgenhaas Gottmadingen
Oh sorry, I read it the wrong way round. AFAIK, there is no integration between the contrib workflow module and ECA. The event that you're using in your module is for the Drupal core workflows module, not for contrib module. That's why it's never dispatched.
- 🇮🇳India drupaluser2017 Bangalore
@jurgenhaas Thank you for clarification. Actually i tried to use it because under the ECA event Entity bundle for contrib workflow was visible.
- 🇩🇪Germany jurgenhaas Gottmadingen
Actually i tried to use it because under the ECA event Entity bundle for contrib workflow was visible.
Where exactly did you see this?
- 🇮🇳India drupaluser2017 Bangalore
I have added an image below in the [type bundle] "Workflow transition OPR" is shown. OPR is label workflow created under contrib. workflow module.
- 🇩🇪Germany jurgenhaas Gottmadingen
That field "Type and Bundle" allows you to limit that event to a specific content type, that currently goes through a transition. That's not about a workflow configuration.
- 🇮🇳India drupaluser2017 Bangalore
Ok I got it. Can we write a custom event and where/how do we do it. So that rest of the action be executed based on that event.
- 🇩🇪Germany jurgenhaas Gottmadingen
You can always write plugins in your custom modules. You can have a look at all the events already available and just write one that works with the workflow contrib module. In our video channel, there are a few examples where we're doing things like that.
However, we've had support issues with the workflow contrib module before, and we haven't encouraged users to use that module as it seemed to be doing some things in its own way. This is not to say that module would be bad or anything, I just don't know how it works and we can't actually provide support for that reason. In previous support cases, users realized that the contrib module is not really needed since Drupal core's workflow and content moderation modules are doing the same thing and are maintained by core maintainers.