When taxonomy terms are deleted, references to them are not cleaned up by drupal core (see #1281114: Database records not deleted for Term Reference Fields after Term is Deleted).
Therefore, we get exceptions
EntityMalformedException: Missing bundle property on entity of type taxonomy_term. in entity_extract_ids() (line 7634 of /opt/drupal/includes/common.inc).
when trying to iterate over them, and content deployments abort.
There are some modules to clean up orphaned taxonomy terms, but I don't think adding them as an dependency and forcing a cleanup before a content deployment wouldn't be a good option.
In my eyes, best thing is just to skip these references (which, in a content deployment, reproduces the dangling pointer on the deployed site). A warning should be logged to give the user the chance to investigate and clean up.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 1920054-1-dangling-references.patch | 2.63 KB | jneubert |
Comments
Comment #1
jneubert commentedAdded a patch for code and test
Comment #1.0
jneubert commentederror message added
Comment #2
dixon_Committed. Thanks!