- Issue created by @spiderman
- 🇳🇱Netherlands johnv
Thanks.
IMO the only needed change is the parameter. The mixup between delete and cancel in intended.
But I am open for test results. Automatically closed - issue fixed for 2 weeks with no activity.
When trying to delete a user on the latest dev branch, Workflow module causes the process to fail, throwing the error:
ArgumentCountError : Too few arguments to function Drupal\workflow\Hook\WorkflowEntityHooks::userDelete(), 1 passed in web/modules/contrib/workflow/workflow.entity.inc on line 77
Try to delete a user from a site with Workflow (latest dev release) installed.
It looks like there was some refactoring of the internal Hook classes that just didn't quite get re-aligned with the traditional alter hooks. The simplest possible fix is just to adjust the calls in workflow.entity.inc to pass the extra parameters that the class methods now expect. However, I think there might be a more elegant refactoring that allows the external functions to be "dumber" and have the class methods handle the particulars.
I'll attach my simplest fix patch momentarily, but also have a closer look to see if I can roll one that's a bit nicer :)
No more errors :)
I assume these are documented elsewhere or something, with the Hook class refactoring.
Active
1.0
Code
Thanks.
IMO the only needed change is the parameter. The mixup between delete and cancel in intended.
But I am open for test results.
Automatically closed - issue fixed for 2 weeks with no activity.