Hi Aporie,
Hope you're fine.
I have been switching to Drupal 9 and I have tested Commerce Funds extensively.
I have noticed that Rules action fails when it comes to perform a transaction.
By similarity with issues I have faced with other modules, I have figured out that the problem is due to the "context" annotation in \src\Plugin\RulesAction\TransactionPerform.php.
The following has to be updated in this file:
Line 16:
- * context = {
+ * context_definitions = {
Line 32:
- $this->getPluginDefinition()['context']['transaction']->setDataType($type);
+ $this->getPluginDefinition()['context_definitions']['transaction']->setDataType($type);
After these corrections, the Rules transactions work again.
Apologies, but I have really no time to propose a proper patch in the next days (my day job is taking all my free time...) , but I hope the above helps to support other users who may have the same issue.
Cheers,
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | D9-Rules-compatibility-context_3166142_2.patch | 1.14 KB | aporie |
Comments
Comment #2
aporieHey Arno2Mars,
Well done ! Was able to reproduce the bug and your fix fixes it.
I've made a patch for it as I can't set the minimum rules version requirement until the change on how they define the context is still is their dev branch (Rules team).
Thanks for the help.
Comment #4
aporie