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.
Hello,
I'm not sure if this is an issue with message or enitycache or it's intended behavior.
I see that entitycache support was added here https://drupal.org/node/1863190
When I have entitycache enabled, I cannot save data to message fields using the entity_metadata_wrapper
The following code creates the message, but the node reference is not populated when I view it using message_ui nor do any node tokens work.
// in my modules hook_node_insert()
$message = message_create('my_message_type', array('arguments' => $arguments, 'uid' => $node->uid),
$wrapper = entity_metadata_wrapper('message', $message);
$wrapper->field_node_ref->set($node);
$wrapper->field_published->set($node->status);
$wrapper->save();
when I disable entity cache, it works fine.
thanks.
Comments
Comment #1
loze CreditAttribution: loze commentedComment #1.0
loze CreditAttribution: loze commentedtypo
Comment #2
aether CreditAttribution: aether commentedI'm having a similar problem. With entitycache enabled, messages are displaying message type field data from the wrong nodes. Disabling entitycache corrects the issue.
Comment #3
alesr CreditAttribution: alesr commentedI explicitly checked both cases with Message module and Entity cache enabled and in both cases the Message entity was updated and showed the right fields from the right nodes/entities.
It might be an old issue that was resolved either in Message or Entity cache module but we steel need to update the status of it if it's not the case any more, therefore marking it as Closed (cannot reproduce).