Active
Project:
EntityFieldQuery Views Backend
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Apr 2013 at 17:36 UTC
Updated:
23 Mar 2015 at 16:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Stephen Rockwell commentedI know you said open up a new bug report, but I also don't want to repeat. I'm getting almost the same error message upon enabling the module.
Notice: Undefined offset: 1 in _efq_views_get_field_handlers() (line 194 of /sites/all/modules/efq_views/efq_views.views.inc).
Comment #2
chx commentedThen you are filing for the wrong version, I am afraid cos in 7.x-1.x-dev this line is empty but the code just moved so I don't think just moving to 7.x-1.x-dev solves the problem. Now, can someone do a cache clear and tell me what this
prints?
Comment #3
chx commentedbsandor, thanks for the bug report but in the future please be more careful and include the file name in the bug report.
Comment #4
mac51 commentedAfter adding the code in comment #2, I received the following output. Disabling the Organic Groups module seems to have resolved the error message.
og_membership__1
og_membership__2
og_membership__3
og_group_ref__og_membership
og_group_ref__og_membership__1
og_group_ref__og_membership__2
og_group_ref__og_membership__3
members__1
members__2
members__3
og_membership__1
og_membership__2
og_membership__3
og_user_node__og_membership
og_user_node__og_membership__1
og_user_node__og_membership__2
og_user_node__og_membership__3
Comment #5
chx commentedThanks! I will install og and see what's up.
Comment #6
amitaibuThese items are provided by OG in hook_entity_property_info(), and they are "dummy" properties in the sense they have no
schema field(i.e. they have no column in the DB that is mapped to them).maybe EntityFieldQuery Views Backend is looking at all the properties defined by entity metadata wrapper, including the computed ones?
Comment #7
chx commentedI believe the colon comes from here (heavily edited):
So, as far as I can see
entity_get_all_property_info($entity_type)[$views_data['real field']]would contain the property info. Nowhook_entity_property_infodocs containcomputedbut og doesn't define that. Just checking forentity_property_verbatim_getwon't fly either cos for egentity/modules/user.info.incdoesn't use that.So we should get the property info as described and definite use when the schema field is defined or the getter callback is
entity_property_verbatim_getand use it. Definitely skip when computed is set. If neither then watchdog error if there is no colon.Comment #8
mac51 commentedSeparated the one-liner causing the issue into multiple lines with appropriate checks. It seems this way is a bit safer, as the number of results returned by explode() is determined dynamically.
Comment #9
scotwith1t+1 for this patch. same issue with OG integration and this solved it. there may be something OG is doing wrong, but haven't explored that option. this works for us though.