Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Provide a full featured views integration.
In general it should be written in a way that the user can see that this doesn't come from taxonomy_index buy from taxonomy_enitity_index.
Comment | File | Size | Author |
---|---|---|---|
#34 | taxonomy_entity_index-views-integration-1353228-34.patch | 14.87 KB | saltednut |
#25 | my _view.txt | 10.36 KB | kaizerking |
#23 | views_integration-1353228-23.patch | 14.87 KB | bigjim |
#20 | tei_fileds error.PNG | 28.22 KB | kaizerking |
#18 | tei tablescreenshot.PNG | 60.27 KB | kaizerking |
Comments
Comment #1
dawehner#1185718: First views integration: Provide a argument handler is part of that patch.
Comment #2
bforchhammer CreditAttribution: bforchhammer commentedI have tags on file entities and wanted an exposed taxonomy filter for a list of files (See #1371974: Exposed taxonomy filter on file view only shows up as numeric input field). This module + patch above allows me to do that.
I created a relationship for the "taxonomy terms on file", then added a respective exposed filter ("Taxonomy Term: Term")... and that filter works just as expected.
Is there something in particular that needs testing on the patch, or anything else that I can help with on this issue?
Comment #3
bforchhammer CreditAttribution: bforchhammer commentedMinor spelling mistake:
"integretable" should probably be "integrable", see: http://dictionary.reference.com/browse/integrable
I also get this notice on the views page:
Notice: Undefined index: base table in taxonomy_entity_index_entity_views_integretable() (line 275 of [...]\sites\all\modules\taxonomy_entity_index\taxonomy_entity_index.module).
Comment #4
bforchhammer CreditAttribution: bforchhammer commentedSorry, just realised that I inadvertently changed the status.
Comment #5
james.williams CreditAttribution: james.williams commentedI have a view that uses a taxonomy with depth filter handler based on the with depth argument provided in the patch, but because I have 30,000+ rows in my taxonomy entity index, the SQL query takes several minutes (!) to execute. Your handler (and mine) is based on the standard views taxonomy handlers, but these are massively quicker, because they have an additional database index, on the 'nid' field (see
taxonomy_schema()
). Should taxonomy_entity_index not need one too? This also raises the additional issue of whether the current handler needs some extra work on its subquery, since surely it shouldn't only be selecting by entity_id, but by entity_type & revision_id instead?Comment #6
james.williams CreditAttribution: james.williams commentedThe attached patch solves the problems I raise above - namely, an index is needed on the DB table, and the views 'with depth' handler needs to filter by revision_id & entity_type rather than entity_id. I have also added my 'with depth' views filter.
Comment #7
james.williams CreditAttribution: james.williams commentedForgot to say this in my previous comment, but I've also addressed the issues raised by bforchhammer in my latest patch.
And just in case anyone is interested, I have a sandbox which I am using as a fork of taxonomy_entity_index module that has this patch applied to it, plus the patch for an admin form to batch process existing entities (http://drupal.org/node/1207794#comment-5165764). This is at http://drupal.org/sandbox/jameswilliams/1424466
Comment #8
klaasvw CreditAttribution: klaasvw commentedThis patch adds the following things:
Makes sure handlers for entities have the entity type mentioned in their title.
Would be great if we could get this to RTBC. This module would be so much more useful with views integration.
Comment #9
bforchhammer CreditAttribution: bforchhammer commentedklassvw: I tried your patch, but it seems to be missing a few changes, e.g. the .module file still has
taxonomy_entity_index_entity_views_integretable
whereas other functions referencetaxonomy_entity_index_entity_views_integrable
... Could you check again, please? Also, did you actually change anything or is it the same code as in james' sandbox?I agree that it would be great to get this moved along... so we can maybe get rid of the various different sandboxes that people use at the moment ;-)
Comment #10
bforchhammer CreditAttribution: bforchhammer commentedI have been using patch #1 for a while without problems, and I have now switched to james' sandbox. I have not stumbled on any major problems.
Only issue that was a little confusing during testing: the Views UI currently shows three taxonomy term filters:
Should 2. be removed, as 1. already seem to do what that one was supposed to?
Comment #11
klaasvw CreditAttribution: klaasvw commentedThis patch fixes the
taxonomy_entity_index_entity_views_integretable
I missed. It also fixes these issues:taxonomy_entity_index_handler_argument_tid_depth
andtaxonomy_entity_index_handler_filter_taxonomy_entity_index_tid_depth.inc
handlers@bforchhammer Yeah, we should look deeper into which handlers can be eliminated and if there are any missing. I'll look into it deeper in the next version of the patch.
Comment #12
bigjim CreditAttribution: bigjim commentedI rerolled the patch from #11 with a few edits/fixes.
- added the call to hook_views_api()
- Added the files to the .info file
- cleaned up handler names to be more consistent ie change taxonomy_entity_index_handler_field_taxonomy_entity_index_tid to taxonomy_entity_index_handler_field_tid etc...
- removed the 2 empty handlers, presumably they can get added back when they do something? Views was throwing "failed to load" errors.
- added taxonomy_entity_index_entity_views_integrable() back into module file.
Comment #13
vood002 CreditAttribution: vood002 commentedI've applied the patch in #12, but don't have any new options in my view.
I have a content view that users can use to manage content. It filters by Taxonomy, and the reason I'm attempting to use this module is because unpublished entities disappear when filtering by taxonomy.
It's my understanding that this module can provide a workaround...however after installation I have no new options under "Contextual Filters". Am I missing something?
Comment #14
bigjim CreditAttribution: bigjim commented@vood002 you've cleared all the caches (including Views caches, which must be done form the Views UI), etc... ?
Comment #15
vood002 CreditAttribution: vood002 commented@bigjim: Thank you very much for the reply...I wasn't able to determine from the thread if this patch should be working for me but your response convinced me. The issue ended up being in my having used the incorrect patch command that didn't respect the directory structure of the module. Having cleaned this up and reindexed all my nodes this module+patch is working perfectly for my purposes. Thank you!
Comment #16
bigjim CreditAttribution: bigjim commented@vood002 no worries
moving to RTBC
Comment #17
kaizerking CreditAttribution: kaizerking commentedViews filter handler broken error
I am getting this error after this patch
Comment #18
kaizerking CreditAttribution: kaizerking commentedI have proifle2, field collect field is attached to profile2, multi value term reference field is attached to field collection field please see attached mySql table screen shot
I have a content type where the same term reference field is used while creating content,
Now, I want to create a view, of content filtered by term reference fields of profile, The entity index table is created, a really nice structure exactly what i wanted, But how to create a view creating this entity index table?
can some one help me.
Comment #19
bigjim CreditAttribution: bigjim commented@kaizerking I'm not 100% sure I follow you but you should see Contextual Filters, Filters, and field under the group "Taxonomy Entity Index". Is that there?
Comment #20
kaizerking CreditAttribution: kaizerking commentedI can find Taxonomy entity index under , contextual filters,Filters, relations
But under format ->fields when i select Taxonomy entity index i get this "The handler for this item is broken or missing and cannot be used. If a module provided the handler and was disabled, re-enabling the module may restore it. Otherwise, you should probably delete this item."
plz see attached screen shot
how ever I am getting the table alright, if some one can help me in creating the view as requested @#18 That would be a great help
Comment #21
dawehner@kaizerking
Are you sure you cleared the cache and rebuilt the registry?
Comment #22
kaizerking CreditAttribution: kaizerking commentedyes, I have installed and uninstalled many times, cleared cache too each time
to help you understand here is my structure:
the structure is as follows for better understanding i am giving the level numbers
Level 1:Profile2
------------Level 2 :Field collection item 1(multi-value)
-----------------Level 3:Term reference field(multi-value)
---------------------------value1
---------------------------value2
------------Level2 :term reference field(this is directly attached to profile2this is also multi-value
---------------------------value1
---------------------------value2
What I am trying to do is get all the nodes filtered by all the terms(reduced duplicates) , When i am selecting TEI in fields this is the message i am getting:
"Broken/missing handler (Broken handler node.taxonomy_entity_index_entity_tid)" , I think it has something to do with multi-value
Comment #23
bigjim CreditAttribution: bigjim commented@kaizerking I have the field message tracked down line 54 of the taxonomy_entity_views.views.inc file was looking for a handler named "taxonomy_entity_index_handler_field_index_tid" it's in fact name "taxonomy_entity_index_handler_field_tid" (ie take out the 2nd "index"). Sorry I missed that I was mostly focused on the contextual filters in my testing.
I'm not sure this explains your other issues with filters from #17 but can you test this patch? If you still get errors does it work without the multi-value field or field collections?
- moving back to needs review
Comment #24
kaizerking CreditAttribution: kaizerking commentedi'll check and revert
Comment #25
kaizerking CreditAttribution: kaizerking commentedNow the TEI is available in fields, but
I am getting this error:
Notice: Undefined index: entity_id in taxonomy_entity_index_handler_field_tid->pre_render() (line 32 of C:\xampp\htdocs\....\sites\all\modules\taxonomy_entity_index\includes\views\handlers\taxonomy_entity_index_handler_field_tid.inc).
Please have a look at attached my_view
Comment #26
kaizerking CreditAttribution: kaizerking commented@bigJim, I do not want this issue to be pending just because of my this issue , My use case is very typical, And bit confusing.I am posting admin login details through contact form to you for your convenience if you do not mind please have a look. this will make things faster and get this committed.
Comment #27
kaizerking CreditAttribution: kaizerking commentedIt seems , if an entity is attached to another entity, it,s parent entity should also be indexed as hostEntityId, hostEntity(bundle), hostEntityType in addition to its own Entity ID,Enity(Bundle),Entity_type data to get the field relation to parent entity
perfect example is my use case, a term reference field is attached to field_collection_item and the field collection item is attached to Profile2, when we see the TEI table now, this information is missing, the table lists the entity ID of the field collection but not the hostEntityId to which this is attached , this will cause a missing data when we are trying to create join term reference field and the profile2 relation ,since the filed is not directly related to profile2.Since entity system is being adopted for all future developments this will be advantageous.
Please consider this, as this will reduce lot of custom joins
Comment #28
kaizerking CreditAttribution: kaizerking commentedAfter applying this patch Profile2 patch I don't get this error at #25 any more
Comment #29
bigjim CreditAttribution: bigjim commented@kaizerking have to admit I'm a little confused. In your opinion is it safe to say this patch is ready to go?
Comment #30
kaizerking CreditAttribution: kaizerking commentedThat patch is not committed yet,Yes it is safe to go after that patch is committed, But there is no point,I have questions on the usage of this module
Taxonomy entity index deals with custom entity types. what about the 'entities' attached to 'entities'?
the relation is not captured properly
I have field collection fields attached to profile2 entity,
When i see the Taxonomy entity index table. I get multiple entries , if you see screen shot attached aboveTaxonomy index table view
in that table you can see field collection items, in fact all those field collection items are attached to profile2 which you can see at the bottom. When i want to create a contextual filter- field collection fields are not recognized as part of/attached to- profile2.and i need to do a separate join with relations,apart from Taxonomy entity index
this will be the dis advantage of this module
A entity wich has hostEntityId , hostEntity, hostEntityType details as Entity meta data which
can also be found in get_entity_info, and entity_extract_ids array, I request if you could accommodate that info
in my case the hostEntity will be my resume and so on , unless this data is pulled to taxonomy entity index this table/module is useless
kindly please support this issue, this will be great module to deal with entities which have terms
Comment #31
bigjim CreditAttribution: bigjim commented@kaizerking I'm with ya on the issue but that really should be another ticket as it's an edge case and has a work around.
marking RTBC
Comment #32
sokrplare CreditAttribution: sokrplare commentedPatch attached to comment #26 is working beautifully for me as well for an exposed filter on image file entities.
Comment #33
Heorhi Lazarevich CreditAttribution: Heorhi Lazarevich commentedFork of taxonomy_entity_index module mantioned in #7 is working beautifully for me on nodes entities with additional views 'with depth' filter handler together with taxonomy_display and view_unpublished modules
Comment #34
saltednutRe-rolled this for latest dev. Would like to get a few more eyes on this before committing and making a new release.
Comment #35
dawehnerGreat to see some progress here, damn this issue is really old.
I'm wondering why this should be put into the module file, as it's just used in the .views.inc file?
Comment #36
saltednut@dawehner I was wondering about that too when I rerolled but I thought maybe someone had a good reason.
Comment #37
dawehnerIt was part of my initial patch in #1, so it feels okay to move in. In general it's better to have at least something that works for many
people then nothing.
I know all this code is pretty much a copy + adaption of the parts which exists in views for the taxonom_index table, but in general stuff like that could be cleaned up quite a bit to use efq instead. Sounds like a good followup.
Another bit, which for sure could be cleaned up in a followup.
Comment #38
saltednutAgreed - we can leave it to followups for the optimization bits. http://drupalcode.org/project/taxonomy_entity_index.git/commit/bc548a1