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.
I am trying to create a second order notification email (for admins).
I cloned Commerce Order: order confirmation at admin/structure/messages and made my necessary changes (just verbiage mostly).
Then I cloned Commerce order message: order notification e-mail at admin/config/workflow/rules. I then edited Create a new entity and changed the type to my new message type and saved.
When I do that, I get an error:
Error: Data selector entity-created:message-commerce-order for parameter data is invalid.
Comment | File | Size | Author |
---|---|---|---|
#14 | cloning_order-1905904-14.patch | 927 bytes | mglaman |
#11 | cloning_order-1905904-11.patch | 1.2 KB | mglaman |
Comments
Comment #1
MrPeanut CreditAttribution: MrPeanut commentedI discovered that the default order confirmation message type has an entity reference field named message_commerce_order.
Neither cloning nor exporting/importing makes that field available in the new message type.
You also are not able to add that field as an existing field.
Comment #2
MrPeanut CreditAttribution: MrPeanut commentedJust for cross-referencing, this issue seems to be the root cause of #1812870: Message Commerce Order cannot be added to other message types.
Comment #3
pun_pun CreditAttribution: pun_pun commentedHI! The same one problem.. :( But i've done more. I created a new entity reference field and changed cloned rule similarly to existing message notify. But nothing help... Message tokens are not replaced by oder data. With all this it's not possible to create any useful customer message...
Comment #4
bojanz CreditAttribution: bojanz commentedWhat you're encountering is a Message bug.
I've posted a patch at #1983138: Cloning a message type doesn't clone the field instances that resolves it.
Comment #6
glass.dimly CreditAttribution: glass.dimly commentedHi there, I'm on the latest Commerce Kickstart 7.x-2.13 with Commerce Message 7.x-1.0-rc1, and I'm still seeing this error on cloning a message type and a rule.
Is this solved in the dev version? I see this was supposedly solved a year ago. Any reason why this hasn't made it into a stable release? Seems like a lot of people would run into this error as they attempted to modify the stock Commerce email.
And also, this is a bug, not a support request. Reclassifying.
Comment #7
glass.dimly CreditAttribution: glass.dimly commentedAlright, upgrading to dev fixed this issue. The question is when the fix will make it into a stable release.
Comment #8
maxplus CreditAttribution: maxplus commentedHi,
I also experienced this issue but just by enabling the commerce message module.
All the rules generated by commerce message failed on integrity check because they could not set a data value "entity-created:message-commerce-order"
I upgraded the Message module to the latest DEV, and everything is OK now
Comment #9
mglamanNo patch, putting to active. I believe this was a bug in Message where cloning didn't copy over field instances.
Comment #10
mglamanOk, now that #2366413: !order-summary token not replaced in message types other than "commerce_order_order_confirmation" landed and we check for the
message_commerce_order
field this is important. I manually did this and it worked with latest Message module. However, it'd be useful to have a test replicating and verifying the field is copied and token exists.Comment #11
mglamanHeading out for day, but here's work on test to clone order notification message and ensure it supports !order-summary token.
Comment #14
mglamanComment #15
mglaman