Closed (fixed)
Project:
MongoDB
Version:
7.x-1.x-dev
Component:
Field storage
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
28 Jun 2010 at 09:26 UTC
Updated:
5 May 2012 at 03:29 UTC
Jump to comment: Most recent file
Using CCK Node Reference with MongoDB Storage module gives the following error on the field management page:
EntityFieldQueryException: No entity_type in mongodb_field_storage_query() (line 259 of mongodb_field_storage.module).
using node reference without mongodb storage does not display such error.
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | no_entity_type-839264-18.patch | 5.88 KB | misc |
| #18 | 839264-entity-field-query-no-entity-type-exception-7.patch | 2.83 KB | misc |
| #7 | 839264-entity-field-query-no-entity-type-exception-7.patch | 2.83 KB | larowlan |
| #5 | 839264-entity-field-query-no-entity-type-exception.patch | 2.48 KB | larowlan |
| #3 | err.JPG | 15.73 KB | visabhishek |
Comments
Comment #1
jthomasbailey commentedI'm getting this without Node Reference, only now it's line 300.
Comment #2
chx commentedhttp://drupalcode.org/project/references.git/blob/refs/heads/7.x-2.x:/no... does not have EntityFieldQuery in it. Tell me more.
Comment #3
visabhishek commentedI'm getting this with integer cck,
ntityFieldQueryException: No entity_type in mongodb_field_storage_query() (line 298 of C:\wamp\www\drupal7\sites\all\modules\mongodb\mongodb_field_storage\mongodb_field_storage.module).
Comment #4
checkerap commentedSame here, but with a term reference field, I selected the vocabulary, but the select list is empty. Using latest dev version.
EntityFieldQueryException: No entity_type in mongodb_field_storage_query() (line 298 of /var/www/cookoo.ro/public_html/sites/all/modules/mongodb/mongodb_field_storage/mongodb_field_storage.module).
Comment #5
larowlanThe issue is that mongodb_field_storage_query is also called without an entity type in operations such as list module's _list_values_in_use function - so we need to inspect the query conditions more closely when we construct and execute our $field_has_data_query object
Patch attached, thanks chx for pointing me in the right direction in #drupal-contribute
Comment #7
larowlanThis one also returns FALSE immediately if the field is not yet attached to any bundles (previously this raised a php warning that $field['bundles'] was not an array).
Comment #9
Donaldd commentedWithout any patches I'm also getting the following error.
WD cron: EntityFieldQueryException: No entity_type in mongodb_field_storage_query() (line 298 of /sites/all/modules/mongodb/mongodb_field_storage/mongodb_field_storage.module).However with the patches applied I'm still getting an error.
With the patch from #5
WD cron: EntityFieldQueryException: No entity_type in mongodb_field_storage_query() (line 320 of /sites/all/modules/mongodb/mongodb_field_storage/mongodb_field_storage.module).and with the patch from #7
WD cron: EntityFieldQueryException: No entity_type in mongodb_field_storage_query() (line 324 of /sites/all/modules/mongodb/mongodb_field_storage/mongodb_field_storage.module).Comment #10
Donaldd commentedWhat's the point of this bit of code, cause I can't figure out what is meant in the comments?
So after commenting this out, I no longer get the error and everything seems to be working fine.
Thanks,
D
Comment #11
ydnar79 commentedI have been testing the patches / suggestions from above, but none seem to work. By chance has anyone come up with a solution to fix this issue?
While I cannot speak for anyone else, this issue is a major no go for me being able to utilize MongoDB on several projects that I am working on. Obviously, MongoDB has some major advantages other database options, but this issue is pretty major.... at least for me. Although, I doubt that I am the only one.....
Any assistance / advice would be greatly appreciated.
Comment #12
drupik commentedHave the same:
EntityFieldQueryException: No entity_type w mongodb_field_storage_query() (line 301 z /home/online/drupal/sites/all/modules/mongodb/mongodb_field_storage/mongodb_field_storage.module).after removed field 'body' - WSOD
Fatal error: Cannot unset string offsets in /home/online/drupal/sites/all/modules/mongodb/mongodb_field_storage/mongodb_field_storage.module on line 87so commented out that line 87
unset($column_values['_language']);to bring my site to life.
Comment #13
misc commented@drupik, are you using CCK Node Reference ?
Comment #14
drupik commented@MiSc no, for field I've installed only Entity Reference and Field Permissions, but not using it nowhere at the moment.
Comment #15
misc commentedOk, I will look into this.
Comment #16
misc commentedI could not reproduce. I Installed latest dev, activated Entity Reference, added reference field. Edited content, added a reference, saved. Worked. No errors. Same for Field Permissions.
Could you try to install the latest dev, and see what you get?
Comment #17
drupik commentedYes, no errors, I've got errors only when remove field, any field not only reference filed.
Forgot to Thank You for the great module ;), my laptop working 5 time faster, thats what im looking for few years, thank You! :D
Comment #18
misc commented@drupik, that is maybe another issue, anyhow, updated the patch posted earlier @larowlan, this works for me with the latest dev if you delete a field, but the field data is still left in mongodb, we should make a fix for that also.
The thanks should go to the guys who started this module, I just jumped on the train.
Comment #19
misc commentedUps sorry, that was the old patch. Here is the new one.
Comment #20
misc commentedComment #21
drupik commentedThanks, now everything looking good.
thats no problem, I do not expect to have several hundred fields to delete them later :D
Comment #22
misc commented@drupik: Yeah, but it would be nice if it would be deleted ;-)
Anyhow, tested to add a Reference field, User and Node, with the patch above to latest dev, and had no problem. @drupik, do you think it should be marked as Reviewed & tested by the community?
Comment #23
drupik commentedI do not know, I'm new in drupal, I tested and it works, works with entity reference.
Dont worry about node reference, it will be deprecated:
Comment #24
misc commentedIf it works, we set is RTBC :-). Getting this into dev.
Comment #25
misc commentedCommited to dev.
Comment #27
joelpittetNice work, latest dev fixed this!