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.
Hi. I got this trying to wrap the entity of type node
EntityMetadataWrapperException: Unknown data property field_usr. in EntityStructureWrapper->getPropertyInfo() (line 335 of /var/www/extranet/sites/all/modules/entity/includes/entity.wrapper.inc).
field_usr -- is field of type entityreference
node bundle i am trying to wrap has no this field
version of module 1.7
code that produces error
$ent = entity_load('node', array(1));
entity_metadata_wrapper('node', $ent, array('bundle'=>'Page'));
bundle is optional
Comments
Comment #2
apaderno