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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

MrPeanut’s picture

I 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.

MrPeanut’s picture

Just for cross-referencing, this issue seems to be the root cause of #1812870: Message Commerce Order cannot be added to other message types.

pun_pun’s picture

HI! 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...

bojanz’s picture

Status: Active » Fixed

What 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

glass.dimly’s picture

Category: Support request » Bug report
Issue summary: View changes
Status: Closed (fixed) » Needs work

Hi 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.

glass.dimly’s picture

Alright, upgrading to dev fixed this issue. The question is when the fix will make it into a stable release.

maxplus’s picture

Hi,

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

mglaman’s picture

Status: Needs work » Active
Issue tags: +Need tests

No patch, putting to active. I believe this was a bug in Message where cloning didn't copy over field instances.

mglaman’s picture

Ok, 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.

mglaman’s picture

Version: 7.x-1.0-beta1 » 7.x-1.x-dev
Status: Active » Needs review
Issue tags: -Need tests
FileSize
1.2 KB

Heading out for day, but here's work on test to clone order notification message and ensure it supports !order-summary token.

Status: Needs review » Needs work

The last submitted patch, 11: cloning_order-1905904-11.patch, failed testing.

The last submitted patch, 11: cloning_order-1905904-11.patch, failed testing.

mglaman’s picture

Status: Needs work » Needs review
FileSize
927 bytes
mglaman’s picture

Status: Needs review » Fixed

  • mglaman committed 4227a9e on 7.x-1.x
    Issue #1905904 by mglaman: Cloning order notification email results in...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.