Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When selecting 'Send invoice receipt email' for an action the next page does not load and I cannot save my action.
Comment | File | Size | Author |
---|---|---|---|
#1 | commerce_invoice_receipt-1496750-1.patch | 571 bytes | Les Lim |
Comments
Comment #1
Les LimThere appears to be a collision with the defined name of the Rules action in the
hook_rules_action_info()
implementation. Defined actions look for a configuration form with a function name ofACTIONNAME_form()
, so the action "commerce_invoice_receipt_mail" is erroneously trying to use the form functioncommerce_invoice_receipt_mail_form()
, which does something else entirely.More careful namespacing of actions should fix this. Patch attached.
Comment #2
Les LimChanging status.
Comment #3
nasheet CreditAttribution: nasheet commentedThis patch works for me. Thank you.
Comment #4
BrianLP CreditAttribution: BrianLP commentedThis doesn't work for me. If I apply the patch, I get "Unknown action commerce_invoice_receipt_mail".
If I try to enter the action "send invoice receipt mail", the page doesn't load but displays this message:
Notice: Undefined property: RulesReactionRule::$order_id in commerce_invoice_receipt_mail_form() (Line 13 ... /commerce_invoice_receipt.admin.inc).
Notice: Undefined property: RulesReactionRule::$mail in commerce_invoice_receipt_mail_form() (Line 19 ... /commerce_invoice_receipt.admin.inc).
Comment #5
Les Lim@papalapapp: try flushing your caches, then delete the action from the rule entirely and re-add the action back in.
Comment #6
Les Limaccidental triple post.
Comment #7
Les Limaccidental triple post.
Comment #8
BrianLP CreditAttribution: BrianLP commentedTripple post? o.O Too much coffee?
Re-adding the action did it. Thanks!
Comment #9
Jorrit CreditAttribution: Jorrit commentedMy recommendation is to change the form id of the form "commerce_invoice_receipt_mail_form" instead of changing the id of the rule, because in that way, the rulesets still work. I think less people care that the form id has changed as opposed to the number of people that are influenced when the rule id is changed.
[edit]
I changed the name of the form to
commerce_invoice_receipt_mail_admin_form
and that works fine.Comment #10
brephraim CreditAttribution: brephraim commentedPatch didn't work, but #9 worked for me.
Comment #11
brephraim CreditAttribution: brephraim commentedTo clarify, I manually applied the change recommended in #9, after applying the patch. So possibly both were necessary, don't know...
Comment #12
DagleesApplied patch and fixed form name.
Comment #13
DagleesComment #14
DagleesFix status