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.
This patch to smartqueue taxonomy allows users to choose to let nodes be added to any of their term's ancestor nodequeues.
It is based on the patch adding 'use_parents'.
Use case:
1. Taxonomy as follows:
- Plants
- Crops
- Oats
- Barley
2. Crops page has a featured content view, which uses nodequeue.
3. People would like to add Oats related articles to the Crops featured content nodequeue.
The patch provides the changes to the admin forms and a hook_update_n to modify the table.
Cheers,
Sam.
Comment | File | Size | Author |
---|---|---|---|
#24 | smartqueue--use-parents-all-20.patch | 3.07 KB | fizk |
Comments
Comment #0.0
samhassell CreditAttribution: samhassell commentedadded pre tags
Comment #1
samhassell CreditAttribution: samhassell commentedIt would be nice to get this into 2.x too, that way I can use it in prod :P
What's the diff between 3.x and 2.x?
Comment #2
samhassell CreditAttribution: samhassell commentedhere's one for 2.x.
Comment #4
samhassell CreditAttribution: samhassell commented2.x one failed against 3.x I'm guessing.
Comment #5
killua99 CreditAttribution: killua99 commentedComment #6
killua99 CreditAttribution: killua99 commented#2: smartqueue--use-parents-all-2.x.patch queued for re-testing.
Comment #7.0
(not verified) CreditAttribution: commentedswitched pre to code tags le sigh
Comment #8
thursday_bw CreditAttribution: thursday_bw at Catalyst IT commentedHere is a new version of the smartqueue--use-parents-all patch.
In time the previous patch has become outdated and doesn't apply cleanly.
It does now.
Also this patch fixes a bug introduced by the previous patch, where smartqueues were being created twice in the database and causing duplicates.
Comment #9
thursday_bw CreditAttribution: thursday_bw at Catalyst IT commentedComment #10
fizk CreditAttribution: fizk commentedComment #11
fizk CreditAttribution: fizk commentedHoping this starts the automated tests.
Comment #12
fizk CreditAttribution: fizk commentedComment #17
fizk CreditAttribution: fizk commentedShould apply to HEAD now.
Comment #18
fizk CreditAttribution: fizk commentedComment #19
fizk CreditAttribution: fizk commentedThe
db_query("SELECT qid, use_parents, use_parents_all FROM {smartqueue} WHERE qid IN (:qids)", array(':qids' => $qids));
was causing the entire site to crash immediately, not giving the admin a chance to update the database schema via the UI.This patch changes the query to
db_query("SELECT * FROM {smartqueue} WHERE qid IN (:qids)", array(':qids' => $qids));
Comment #24
fizk CreditAttribution: fizk commentedCommitted, thanks.