🇬🇧United Kingdom @hughworm

Account created on 18 May 2009, over 15 years ago
#

Recent comments

🇬🇧United Kingdom hughworm

I have the same problem. In addition to using the "transition pre" case to validate and veto transitions, I've used it to set various fields on the entity when the workflow state changes, as indicated by the comments in workflow.api.php:

    case 'transition pre':
      // The workflow module does nothing during this operation.
      // Implement this hook if you need to change/do something BEFORE anything
      // is saved to the database.
      // If you return FALSE here, you will veto the transition.

This no longer works. I have reverted to 8.x-1.7 to allow the site to continue to function.

I found that in workflow.module the call to execute transitions had changed from within the workflow_entity_presave hook to the workflow_entity_update hook (117b4cec544cc4a5d74fe97cc04fa5ce07479a6a), which explains the changed behaviour.

But I also noticed that CRUD hooks are removed altogether in latest dev code. 

So I'd be very grateful if someone could tell me where I should move the logic currently implemented in hook_workflow to, for compatibility with future releases?

🇬🇧United Kingdom hughworm

I tried a reverted NodeGrantDatabaseStorage->alterQuery() (back to D9 version) and it seems to work. The only difference was the lack of different processing for joined based tables. Patch attached.

Production build 0.71.5 2024