EntityFieldQueryException: Unknown field: field_size_price in EntityFieldQuery->addFieldCondition() (line 765 of /var/www/vhosts/httpdocs/includes/entity.inc).

I also then get an error on views with the collection:
See attached pic

Adding a blank field collection with the same machine name fixes it

field collection views.png29.72 KBnicxvan


Zero4ffect’s picture

I can confirm this issue.

Work Around:

  1. Delete all records from the following tables where field_name equals the_fc_machine_name:
    • field_collection_item
    • field_config
    • field_config_instance

I had removed all fields from the field collection before I deleted the collection itself so I'm not certain that the above actions are all that needs to be done to stop the error from being thrown on field delete.

jmuzz’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

There have been improvements to the behaviour around deleting nested field collections including #2123559: Removing field collection item also removes sibling's nested child content and it should be working in the latest version.

If not, please reopen with detailed steps to reproduce the error.