When saving programmatically an entity that does not have a "format" property for "body" or "description" field, the title_field_text_with_summary_sync_set() function throws a PHP notice.
To reproduce such bug, just create a dummy term in a vocabulary that have the "description" field replaced by a standard field. The term should only have a name and the related category keys (vid and vocabulary_machine_name) and may have a description set to NULL for example.
When saving programmatically the term, the bug occurs.
You may use for dummy creation the entity_create() function from Entity API module.
Comments
Comment #1
b-prod commentedFor info, the described bug is quite similar than the one in #1219860: Undefined index "format", that occurs in another function.
The patch below fixes that.
Comment #2
plachCommitted and pushed, thanks!
Comment #4
makokis commentedI get this error using last Commerce Kickstart profile version 2.14:
Notice: Undefined property: stdClass::$format en title_field_text_with_summary_sync_set() (línea 167 de ../profiles/commerce_kickstart/modules/contrib/title/title.core.inc).
when triying to edit an existing Newsletter but it appears without changes made on it... (here is a screenshot)
do you recommend apply this patch?, it's older than one year
thanks
Comment #6
norman.lol4 years later, patch still working. Hope it gets merged soon. Had this issue when creating terms with description_field programmatically.