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.
If I have nodes without "body" field (I really don't need "body") I've got following notices:
Notice: Undefined index: value in entity_metadata_field_text_get() (line 585 of /home/alinaki/www/drucon/htdocs/sites/all/modules/entity/modules/callbacks.inc).
Notice: Undefined index: summary in entity_metadata_field_text_get() (line 585 of /home/alinaki/www/drucon/htdocs/sites/all/modules/entity/modules/callbacks.inc).
BUT!
If I create node type Page with "body" - all of this notices just gone away.
P. S. sorry for bad English
Comments
Comment #1
DonAtt CreditAttribution: DonAtt commentedIn RestWSBaseFormat::getData() function there is a foreach which iterates through the properties of the entity (this time a node) and it finds "body" field as well though it is not there (restws.formats.inc line 208).
The patch in the related Entity API issue solved the problem for me.
Comment #2
BR0kENThe actual problem is in Entity API project.