EntityMetadataWrapperException: Unknown data property field_comment_ref. in EntityStructureWrapper->getPropertyInfo()

Created on 28 August 2014, almost 10 years ago
Updated 15 January 2024, 5 months ago

Using the following custom module code:

function message_notify_send_module_comment_insert($comment) {
  $message = message_create('tasktracker_subscription_notification_email', array('uid' => $comment->uid));
  $wrapper = entity_metadata_wrapper('message', $message);
  $wrapper->field_comment_ref->set($comment);
  message_subscribe_send_message('comment', $comment, $message);
}

I get the following error: EntityMetadataWrapperException: Unknown data property field_comment_ref. in EntityStructureWrapper->getPropertyInfo()

When I comment out $wrapper->field_comment_ref->set($comment);, the notification is sent (via e-mail), but no tokens used in the message type are replaced.

Any ideas?

πŸ› Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024