Needs review
Project:
Taxonomy Entity Index
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
2 Apr 2013 at 13:46 UTC
Updated:
11 Dec 2017 at 14:06 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
derhasi commentedAnd there is a working version:
Comment #2
saltednutThere seems to be a lot going on here. Is it standard to provide a DEVELOPERS.txt? Perhaps that info should get moved into a README.txt - we need one of those anyway :)
Comment #3
dave reidIs there really any other field aside from entityreference that can refer to taxonomy terms? Of anything, I think those most useful code here is taxonomy_entity_index_get_terms_from_taxonomy_term_reference() and taxonomy_entity_index_get_terms_from_entityreference(). I'm not super sure that we actually need to abstract much else though.
Comment #4
derhasi commented@Dave, I think the abstraction does not cost anything in here, and it would ease the work for custom fields building upon taxonomy term references.
Comment #5
fox mulder commentedThere is a small error in the function taxonomy_entity_index_get_terms_from_entityreference()
if the first if statement returns FALSE than $terms variable does not exist.
Solution 1.:
or solution 2.:
Comment #6
fox mulder commentedsame situation in taxonomy_entity_index_get_terms_from_taxonomy_term_reference() function too...
Comment #7
scotwith1tSuper happy to find that someone else has already run into this and written a patch. Anxious to try but wondering how likely this is to get in? We often use entityreference fields instead of term reference fields for the reasons mentioned and I would love to see an official implementation in this module so we don't have to keep it in our "hacked" folder :-/ Will report back if I have success with the patch though, thanks!
Comment #8
scotwith1tWell, first try at this didn't work for me. I suspect it has to do with the fact that the use case for us is an og_vocab field, which uses a more complicated OG-based widget, so it probably just won't cooperate with this. Haven't had time to dig into it much, but hope to see some progress on this issue regardless as it makes perfect sense to catch entityreference fields using the Taxonomy entity type, which are essentially Term Reference fields.
Comment #9
dpacassiSeems to work for me, I've updated the patch to also fix the small errors found by fox mulder in #5