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.
Surface the vocabulary[module] field for filtering, arguments and sorting. Patch coming.
Comment | File | Size | Author |
---|---|---|---|
#29 | 789674-29-vocabulary_module-6.x-2.x.patch | 10.16 KB | makara |
#28 | 789674-28_vocabulary_module.patch | 10.85 KB | katbailey |
#28 | 789674-28_vocabulary_module-no-prefix.patch | 10.82 KB | katbailey |
#27 | 789674-11_vocabulary_module.patch | 9.47 KB | christianchristensen |
#22 | views-789674-22.patch | 9.53 KB | jghyde |
Comments
Comment #1
alex_b CreditAttribution: alex_b commentedThis is a first shot.
If it has a potential to be committed to Views, I can expand on it and add relationship handlers and argument validators that heed the vocabulary[module] field either to this patch or in follow up patches.
Background: I am using the vocabulary[module] field to make vocabularies exportable: #789556: Support taxonomy vocabularies
Comment #2
dawehnerI think this is a c&p error.
I'm interested :) What happens if you add a field handler for a argument, does it crash totally, or are there any weird behaviors?
Powered by Dreditor.
Personally, i don't see a reason, why not to commit it to views. The field is in the database, so supporting it is totally fine.
Comment #3
alex_b CreditAttribution: alex_b commenteddereine: yeah, I actually don't want to know ;-)
The attached patch:
- fixes the argument handler
- adds vocabulary[module] support to views_handler_filter_term_node_tid . UI: http://skitch.com/alexbarth/dnfy3/zend-studio
The module support for the filter handler comes with the caveat that it needs to fall back to the first vocabulary found if a module owns more than one vocabulary. This is a negotiable drawback for the use case that I am looking at: making vocabularies exportable (#789556) and I hope it's an acceptable approach for Views. If not, please advise.
Comment #4
mrfelton CreditAttribution: mrfelton commentednothing to add - just subscribing.
Comment #5
randallknutson CreditAttribution: randallknutson commentedTried this out in conjunction with http://drupal.org/node/789556 and was able to filter by a specific taxonomy and export that view to another machine.
Comment #6
randallknutson CreditAttribution: randallknutson commentedI've added the ability to limit the list of terms in a field by vocabulary module.
Comment #7
yhahn CreditAttribution: yhahn commentedI've rerolled the patch in #6 using cvs -Nup, suitable for makefiles, etc.
Comment #8
mstef CreditAttribution: mstef commentedAny chance of this seeing views 2.x?
Comment #9
dawehnerSure the thing it's easy.
If someone reviews the patch and someone commits the patch it will get in.
Comment #10
merlinofchaos CreditAttribution: merlinofchaos commentedWe may as well go for the 'user friendly' name of the module. It's available out of the system table and I believe system table is already loaded and cached, so it's just a matter of getting to it.
Comment #11
dawehnerHere is a rerole against the lastest version of 3.x
Sadly there is no api function to get the info out of the database.
So it's needed to write one, or?
Comment #12
merlinofchaos CreditAttribution: merlinofchaos commentedEither that or just join the system table and extract it as a field.
Comment #13
dixon_Interesting! Subscribing. Will test the patch later today and make a reroll against Views 3.x if needed.
Comment #14
dagmar@merlinofchaos: Sadly readable name for modules is serialized into {system}.info, as far I know, there is not a easy way to extract it with SQL functions.
This may be a way to get the module names.
Comment #15
dmitrig01 CreditAttribution: dmitrig01 commentedearl - given the initial use case of this patch, i think it woludn't be necessary (he's using it for made-up module names, to export it).
Comment #16
bforchhammer CreditAttribution: bforchhammer commentedSubscribing.. :)
Comment #17
Danny EnglanderSubscribing
Comment #18
bojanz CreditAttribution: bojanz commentedBump. I'd like to see this too (in both 3.x and 2.x, since I'm helping out on a project which uses 2.x).
I'm prepared to push this forward, just not sure in what direction (earl didn't reply to dmitrig01's #15)
Comment #19
bojanz CreditAttribution: bojanz commentedComment #20
smls CreditAttribution: smls commentedsubscribe
Comment #21
merlinofchaos CreditAttribution: merlinofchaos commentedHm. Probably should've been taken out of needs work based on disagreement with my review.
Comment #22
jghyde CreditAttribution: jghyde commentedI needed this to work with views 6--212, so I re-rolled #7 against that distro. This may help some of you old army guys like me who are seeking this feature in D6 Views 2. See attached.
Comment #23
kehan CreditAttribution: kehan commentedPossibly related to this issue but not completely, you can specify a filter by vocabulary machine name name in drupal 7 / features #1071308: Features views filter on vocabulary uses vid
Comment #24
langworthy CreditAttribution: langworthy commentedThe patch in #22 didn't work for me with views-6.x-2.12. The "Taxonomy: Vocabulary module" filter for the owner of the module has a broken/missing handler. The patch in #5 works but doesn't add options to the term filter as described in #3. The patch in #3 failed.
Patch in #11 fails (no surprise) in the latest 6.x-3.x-dev. I took a look but I'm not sure how to reroll it.
As mentioned in #15 I don't think we need to get the user friendly name of the module as mentioned in #10.
Comment #25
dawehnerThis patch will probably not commited against views 2.x-dev so it's no big problem that it does not work with 6.x-2.12
Comment #26
langworthy CreditAttribution: langworthy commentedOf course. I was just trying to point out for others looking for a quick 2.12 fix that the patch supplied in #22 doesn't work for me.
Comment #27
christianchristensen CreditAttribution: christianchristensen commentedRe-rolled this patch against 6.x-3.x-dev from #11 ... worked on the failing hunks which seemed to be mainly from moving changes in 3.x branch.
Comment #28
katbailey CreditAttribution: katbailey commentedThe previous 2 patches left out the views_handler_filter_vocabulary_module.inc file. The attached two patches are basically #27 with the missing file added, one version rolled with the --no-prefix option and one without...
Comment #29
makara CreditAttribution: makara commentedRe-rolled for latest Views 2.x.
Comment #30
MustangGB CreditAttribution: MustangGB commented