If a field is deleted that has a complimentary referrer field in another content type, the content where the field was deleted will cause an exception error from within Entity.inc

EntityFieldQueryException: Unknown field: fieldname in EntityFieldQuery->addFieldCondition() (line 766 of sitename\includes\entity.inc).

The field name will show up in the entity.inc function but will not show up in any of the field information areas. This is because the corresponding node reference is sending it as part of the reference. Deleting the node referrer field in the other content type will resolve the issue. If that is not a plausible resolution, it may be that rebuilding the references for both content types may resolve it.

It would make sense though that the CNR module set a flag or something so drupal or the Fields API warns that it is tied to the referrer before deleting the field.

Comments

hollyfox created an issue.

Rafal Lukawiecki’s picture

I am affected by this issue. Using Drupal 7.54. Have you found a fix yet? Thank you.