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 exported all my message types, fields, ... as features and imported them.
But somehow the message_type was not created/activated.
Which resulted in this error?
EntityMetadataWrapperException: Unknown data property message_text. in EntityStructureWrapper->getPropertyInfo() (line 339 of /data/www/sas-webstore/www/sites/all/modules/contrib/entity/includes/entity.wrapper.inc).
What can I do?
Can I activate it somehow?
Comments
Comment #1
thim CreditAttribution: thim commentedNot sure why this happened but I ran
the following code via the /devel/php and then the message_text field was created
I'm going to put it in a update_hook and in the install_hook of my module.
Comment #2
vasikethere's a similar issue on Commerce Message issue queue : #2053821: EntityMetadataWrapperException error every time new orders are entered.
Comment #3
rbosscher CreditAttribution: rbosscher commentedI've had the same error.
Reinstalling the message module resolved the issue.
Comment #4
that0n3guy CreditAttribution: that0n3guy commentedRe-installing seemed to take care of this for me too (I am on v1.7 though).
Comment #5
geek-merlinSetting major as this makes the module unusable.
For me this is fixed by #2108283: Entity language info missing.
Please review so we can get this in.
Comment #6
harings_rob CreditAttribution: harings_rob commentedRunning #1 solved the error message, but the message description is empty (even when creating a new)
Comment #7
harings_rob CreditAttribution: harings_rob commentedremoving, unsinstalling, installing commerce kickstart orders and commerce message solved this.
Comment #8
maxplus CreditAttribution: maxplus commentedProblem also solved for me by just disabling and back enabling the Commerce Message, Message and Message Notify modules
EDIT:
problem is not solved, only when I keep Commerce Message disabled...
Comment #9
gowlj CreditAttribution: gowlj commentedsame problem here, disabling/enabling modules did not resolve.
error if fired by opening /content/message or orders in quick edit mode.
(the last issue is partially fixed by hiding in commerce/config/order/display the field EVA: Commerce Message: Order messages - Entity content)
Comment #10
alexmcl CreditAttribution: alexmcl commentedSolution from #7 by easycombvba worked for me
Comment #11
geek-merlinHere's a shortdut that helped me:
Comment #12
andyg8 CreditAttribution: andyg8 as a volunteer commentedI've just encountered the same error after updating to Views 7.x-3.11 and Drupal 7.37 with rc3 and dev. I've disabled all the Message modules and re-enabled to no avail. In dev I don't seem to get the fatal error, just the order's history table is empty.
In rc3 the fatal error seems to occur the first time I try to load an order from within admin. After navigating away from the order and coming back to it no error - just the Order history table is empty.
Any recent thoughts on this issue?
Comment #13
peezy CreditAttribution: peezy as a volunteer commentedIn case it helps anyone else using Commerce Kickstart who sees this error, I found this post on DrupalCommerce.org, which had a simple solution: hide the EVA Commerce Message field from display on Orders. Here are the detailed steps:
Comment #14
millionleaves CreditAttribution: millionleaves as a volunteer commented#13 helped me on a non-Kickstart Commerce site on which I just enabled Message and Commerce Message - thanks. Reading through this and similar issues, I'm guessing this all comes back to whether you've got translation enabled for the site (I do).
Comment #15
millionleaves CreditAttribution: millionleaves as a volunteer commentedUpdate... different site to #14.
I was experiencing this issue in line 354 instead of 336. Upgraded to latest -dev of Commerce Message. No change.
#13 didn't help.
#11 did the trick but had the same result described in #6. I'm not relying on the Messages, they did have some use. Now they're all blank - old and new.
Comment #16
Donit CreditAttribution: Donit commentedUninstalling, removing and installing Commerce Message again did the trick for me - but at a high price: all messages lost.
Comment #17
torgosPizzaHi folks,
I had the "message_text" entity property disappear on me for some unknown reason (I've been doing a lot of patching and cache-clearing) which ended up in the same EntityMetadataWrapper Exception as seen here and other places. Somehow this only affected message types provided by Commerce Message, so I think the actual bug lies there. This was reinforced by the fact that my custom-coded message types still had their Message text fields, but none of the Commerce Message types did.
So while I can't easily determine why it happened, here is a snippet of code that should fix it. Basically we just need to re-add the field instances to the Commerce Message types, and then invoke the default_message_types hook to add their default values back in.
After executing this script (I used
drush scr
) the Message text field returned with its default values, and I simply had to reconfigure them to our own needs. A pain, to be sure, but it beats uninstalling and reinstalling the module! Especially since doing so triggers a bunch of SQL updates and deletions, which can take quite some time on huge DBs such as ours with millions of message rows.Hopefully this snippet can help others in a similar situation. If I can determine when and how the message text field got deleted, I will file a follow-up bug report.
Comment #18
bluegeek9 CreditAttribution: bluegeek9 as a volunteer commented