When this module is enabled every time I try to view and order the following error occurs and the order does not show;
EntityMetadataWrapperException: Unknown data property message_text. in EntityStructureWrapper->getPropertyInfo() (line 339 of /var/mysite/sites/all/modules/entity/includes/entity.wrapper.inc).

When I disable the module and then re-enable it everything works fine. Until a new order is entered and then I get the message again.

I can also Edit the order without problem. It is only the view which fails.

I am running DC 7.x-1.8

Any ides?

Comments

vasike’s picture

Status: Active » Postponed (maintainer needs more info)

i couldn't reproduce this and i can't see how could be generated by Commerce Message module.
do you have any customization? could you provide more info about your system?

vasike’s picture

Version: 7.x-1.0-rc1 » 7.x-1.x-dev
Status: Postponed (maintainer needs more info) » Active

I faced the same issue working on Drupal Commerce with Commerce Discount module with some Discounts defined.
But once i uninstall/reinstall i can't reproduce it anymore.

@keithmorr : Do you have something similar?

there's a similar issue on Message issue queue : #2045953: Unknown data property message_text.

brunorios1’s picture

same problem here with Drupal Commerce.

the client place a new order;
the admin try to access /admin/content/message and the error appears:

EntityMetadataWrapperException: Unknown data property message_text. em EntityStructureWrapper->getPropertyInfo() (linha 339 de /home/brunorios/www/cmc.dev/sites/all/modules/entity/includes/entity.wrapper.inc).

thanks.

brunorios1’s picture

Priority: Major » Critical

Is happening with old orders too.
I tried to change the status in the admin via the "quick edit" of commerce_backoffice and get ajax error.
Then i changed the status in the order edit page.
Now the site crashes when the client visit the order page.

ar-jan’s picture

I'm also seeing this. (Using drupal 7.24, commerce 1.8, message 1.9, commerce_message 1.0-rc1).

When I use the commerce_backoffice quick edit, I get the ajax error. When I go to the page behind that, commerce_backoffice/order/123 (and also on admin/commerce/orders/123) I get:
EntityMetadataWrapperException: Unknown data property message_text. in EntityStructureWrapper->getPropertyInfo() (line 339 of /sites/all/modules/contrib/entity/includes/entity.wrapper.inc).

But visiting admin/commerce/orders/123/edit shows the problem behind this:
Field commerce_customer_shipping attempted to use the non-existing customer profile type shipping.

I had had shipping enabled before, but am not using it now. The commerce_customer_shipping reference field on the type was still there. I deleted it and cleared caches, but the problem persists.

Disabling commerce_message makes the problem go away.

havran’s picture

Issue summary: View changes

Same problem here.

lsolesen’s picture

Status: Active » Postponed (maintainer needs more info)

Can any of you supply exact steps to reproduce on a clean install - e.g. based on commerce kickstart?

jeremdow’s picture

I wish I had exact steps to reproduce, but to add to this, or maybe clarify -

At least in my case, the error is correct, the default commerce messages literally have no message_text property defined after install.

i.e. going to /admin/structure/messages/manage/commerce_order_state

There is no text area for the message text, only replacement tokens, and history is not being added to orders.

jeremdow’s picture

Uninstalling / reinstalling the module solved in my case -

As above disabling/re-enabling temporarily clears the errors, but the message templates need to be recreated to really fix.

ianniscamillieri’s picture

I get the same error except the number of the line (335 instead of 339):
EntityMetadataWrapperException: Unknown data property message_text. in EntityStructureWrapper->getPropertyInfo() (line 335 of [domain]/sites/all/modules/entity/includes/entity.wrapper.inc).

It happens when :
- clicking on the order link in the completion message at the end of a checkout process
- trying to access admin/content/message
- trying to quick edit an order in admin/commerce/orders :

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /shellac_v235/commerce_backoffice/order/1/admin_page?destination=admin/commerce/orders
StatusText: Internal Server Error
ResponseText: EntityMetadataWrapperException: Unknown data property message_text. in EntityStructureWrapper->getPropertyInfo() (line 335 of [domain]/sites/all/modules/entity/includes/entity.wrapper.inc).

Disabling the Commerce Message module make the issue disappear (but with the module features of course!)

I've tried to enable/disable-uninstall/reinstall but I always got the same issue.

alexmcl’s picture

I get the same problem. I'm running 7.x-1.0-rc3 as part of Commerce Kickstart.

It started out with the problem occurring on /admin/content/message and admin/commerce/orders/{order num}/history

I did what is suggested in earlier messages:
1. Disable Commerce Kickstart Order
2. Disable Commerce Message
3. Re-enable Commerce Message
4. Re-enable Commerce Kickstart Order

This removed (at least for now) the error for admin/commerce/orders/{order num}/history as there is no history, but I still get errors on /admin/content/message

The error log gives for /admin/content/message:

Location: /admin/content/message
Referrer: /admin/commerce/orders/7/history
Message: EntityMetadataWrapperException: Unknown data property message_text. in EntityStructureWrapper->getPropertyInfo() (line 335 of /home/sites/pearlsunlimited.co.uk/public_html/profiles/commerce_kickstart/modules/contrib/entity/includes/entity.wrapper.inc).

Order 7 was the last order that I had viewed the history for. If I then view a different order (i.e. order 6), when I go back to /admin/content/message the error log then shows the referrer as /admin/commerce/orders/6/history

@vasike:
- what further information would be helpful?
- is the php posted by @thim on https://www.drupal.org/node/2045953 of any benefit?

alexmcl’s picture

Some further information:

I don't get the same behaviour on my local site dev - the local site has the messages and order history all fine. The main differences between the local dev and live site are that the live site is https and has live Oauth and Facebook login.

The message that was sent from the live site to my test email account should have the order summary from !order-summary in the /admin/structure/messages/manage/commerce_order_order_confirmation email body and doesn't.

The !order-summary does appear in the message in the local dev.

The message email body on both is:

[site:site-logo]
Many thanks for your order
Here are the details for your order #[message:message-commerce-order:order-id], placed on [message:message-commerce-order:created]

View your order
Ship to

[message:message-commerce-order:commerce-customer-billing:commerce_customer_address]

Items in your order

!order-summary
If you have any questions, please contact us

Returns: As set out in our returns policy, we will accept returns where the product is faulty. You have seven working days in which to cancel. Unless faulty, postage costs are not refundable. Earrings are exempt from return for hygiene reasons.
alexmcl’s picture

Just solved the problem on my site. Solution on Issue 2045953#7 by @easycombvba worked. To repeat here as steps:

  1. Disable Commerce Kickstart Order
  2. Disable Commerce Message
  3. Uninstall Commerce Kickstart Order
  4. Uninstall Commerce Message
  5. Re-enable Commerce Message
  6. Re-enable Commerce Kickstart Order

I didn't need to remove any database tables.

--
[This doesn't answer the question of how the error occurred in the first place however.]

oakulm’s picture

Thumbs up for #13. Possibly something to do with upgrading modules?

Marko B’s picture

When my site was in problems, and it was down(live site) this module got corrupted or something. The same error as above. So only thing I could do in the end is reinstall and loose all the data in it :(

psegarel’s picture

#13 solved the issue for me too.

drush dis commerce_kickstart_order commerce_message -y
drush pmu commerce_kickstart_order commerce_message -y
drush en commerce_kickstart_order commerce_message -y