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

DonAtt’s picture

In 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.

BR0kEN’s picture

Status: Active » Closed (works as designed)
Parent issue: » #2264765: entity_metadata_field_text_get throws notices if field is empty

The actual problem is in Entity API project.