I have one custom content. It contains a multiple collection field. If I create a new entity (via entity_metadata_wraper), how can I set a new multiple collection field ?
by example :
$new_entity = entity_create('node', array('type'=>'custom content'); $new_entity_w = entity_metadata_wrapper('node',$new_entity); ... $new_entity_w->a_new_multiple_collection_field->some_field->set('...'); //(1) doesn't work //$new_entity_w->a_new_multiple_collection_field->some_field->set('...'); //(2)doesn't work
Error for (1) : Unable to set the data property some_field as the parent data structure is not set
Error for (2) : PHP Fatal error : Cannot use  for reading in /var/...
I didn't find...thank you for some help !