By hillaevium on
Hello -
One of my Drupal sites recently developed an odd behavior, where anytime a field is deleted the operation is completed successfully, but then an EntityFieldQueryException is thrown:
EntityFieldQueryException: Unknown field: field_event in EntityFieldQuery->addFieldCondition() (line 770 of /usr/share/drupal7/includes/entity.inc).
I tried to dump the caches and run update.php (incase something odd happened in the DB, I hadn't performed any updates), but neither seemed to make any impact.
Any help would be appreciated!
Comments
Did you manage to work out
Did you manage to work out what was causing this?
Thanks,
Unfortunately not. Let me
Unfortunately not.
Let me know what additional information I could supply to help out troubleshooting!
me too...
me too...
same for me
Have exactly the same problem.
same
same problem...
same here... i've created a
same here... i've created a fieldgroup and later removed it and after that each time i delete a field i get this:
More info in Field collection » Issues
More info on this issue here: http://drupal.org/node/1498746
I'm also having this problem
I'm also having this problem
It seemed to be a problem
It seemed to be a problem with fields that were 'field collection' fields. After deleting the field collection, the fields remained. I had to delete the rows that corresponded to the field from the 'field_config' and 'field_config_instance' tables.
Thanks @2pha that solved it
Thanks @2pha that solved it for me.
it works for me
Hi,
this worked for me as well.
I also did one more thing thou:
DELETE FROM `field_config` where field_name="my_badly_behaved_field";
This also worked for me.
This also worked for me.
thx
thx
it works!
Thank you, Sir! your idea was very helpful!
Same here...
Same here...
Same problem.
Same problem.
I found a solution that
I found a solution that worked for me.
Create again the field with the same machine name and with a field_collection type.
Then, create other field to test if you're able to delete without the message.
If you got the right message, you can delete the field_collection field and that's it.
It works nice! Thanks!!!
It works nice! Thanks!!!
I got this to work for me
I got this to work for me also, but I had to do a few extra steps:
I think i made this even more complicated because I had also deleted the content type that the field was attached to. When I tried this it didn't work the first time. So I recreated the content type with the same name, and then added a field collection with the name of the problem field. The first time I tried to delete, I got some funky error messages. So, I started over, and after I remade the field collection again, I *ran Cron*, and THEN deleted the field collection without any problems. Ran cron again, and the error messages had disappeared.
Not exactly sure if the content type had anything to do with it, I suspect it may have been running Cron first after remaking the field collection, and then deleting it.
Commands to find and manually delete the fields using phpadmin
The suggestions from 2pha above worked for me. Here's how I did it:
You're looking for something like:
EntityFieldQueryException: Unknown field: field_paerformers in EntityFieldQuery->addFieldCondition() (line 770 of...In my case the badly behaved field is "field_paerformers". Substitute your case for "my_badly_behaved_field" below.
SELECT * FROM `field_config_instance` WHERE `bundle` = "my_badly_behaved_field"SELECT * FROM `field_config` WHERE `field_name` = "my_badly_behaved_field"DELETE FROM `field_config_instance` WHERE `bundle` = "my_badly_behaved_field"DELETE FROM `field_config` WHERE `field_name` = "my_badly_behaved_field"Worked perfectly for me!
Worked perfectly for me! Thanks!
worked perfectly!
Thanks a lot!
Worked perfectly
This fix does the job! Thanks.