If a queue is renamed (from the node queue "edit" page), it seems to appear named correctly on the node queue list page.
However, on the "Node queue" tab of a valid node, the queue seems to retain its original name.
| Comment | File | Size | Author |
|---|---|---|---|
| #23 | 281040.patch | 1.3 KB | ezra-g |
| #15 | subqueue_title.patch | 1.27 KB | jmather |
| #13 | subqueue_title.patch | 1.27 KB | jmather |
Comments
Comment #1
merlinofchaos commentedHmm. This probably means the subqueue needs to be renamed as well I think, at least in regular queues.
Comment #2
Coyote commentedYep. When I looked in the db, there was a single subqueue for each nodequeue I'd created, and their names were not updated when changes were made elsewhere!
Comment #3
merlinofchaos commentedAs a workaround you can rename the subqueue in the database; it's not ideal but it does mean you can get around the problem for the moment.
Comment #4
ezra-g commentedCan you test the patch at http://drupal.org/node/277867 and see if it resolves your issue?
Comment #5
ezra-g commentedI can reproduce a different symptom but show the same underlying problem, that subqueue settings are changed in the nodequeue_queue but not for each individual subqueue in the database. For me, however, they show correctly on the node/nid/nodequeue tab and incorrectly in the links.
We need a function to batch update subqueue titles after the (parent) queue title settings change. I'm changing the title of this issue so it's more clear to me which one it is ;).
Comment #6
ezra-g commentedSince smartqueues can define subqueue titles, one solution is to create a new hook that gets called from nodequeue_save, and when the setting for subqueue titles is changed, nodequeue has smartqueues generate new titles, which nodequeue will then save.
What do you think, merlinofchaos?
Comment #7
Leeteq commentedSubscribing.
Comment #8
joachim commentedSubscribing.
Comment #9
psynaptic commentedJust noticed this. I think it's this anyway..
I have renamed some of my nodequeues and the nodequeues at node/*/nodequeue still have the old names.
Going to rename in the db for now.
Comment #10
ezra-g commentedThis is still present in the D6 version.
Comment #11
jmather commentedIs this fixed yet? We have a large number of normal queues and this causes significant pain anytime we rename a queue...
Comment #12
ezra-g commentedThis has not been fixed because nobody has taken the time to submit a patch for it. If you'd like to help it get fixed faster, I'd be happy to review a patch. Another option is to hire a developer to patch this.
Comment #13
jmather commentedI attached a quick shot at it, not sure if this is the right way to make sure we are getting the master->queue->subqueue relationship. Thanks for a review.
Comment #14
jmather commentedSorry that patch is bad, will put another up shortly...
Comment #15
jmather commentedOkay, try this one..
Comment #16
ezra-g commentedThanks for the patch!
The code in this patch updates the nodequeue_subqueue table but uses the qid value instead of the sqid value, which won't work in all cases.
This prompted me to take a closer look at the code involved here. We want to make sure that title changes are done when updating a queue using the queue_edit_form, and also respect titles that are configured to use a string replacement in the name of the subqueue, such as the included smartqueue.module which replaces %s with the name of a taxonomy term.
Nodequeue already has a nodequeue_subqueue_update_title() function, but in cases where the subqueue titles are configured to use string replacement, we need to run this query for every subqueue when the edit_queue form is submitted :/. So, the complete solution here IMO is probably to implement a new hook that lets smartqueues declare all of their subqueues so that the titles can be processed and saved to the database using string replacement where necessary.
This sort of makes me wonder though, why we need to even store these processed titles in the database instead of just storing the pattern and doing the string replacement when the subqueue titles are displayed.
This bug could probably fixed for non-smartqueues relatively simply nodequeue_subqueue_update_title(), so I would commit a patch that does that in the meantime :).
Comment #17
jmather commentedThanks..I realized that later the sqid is not directly correlated to the qid even in non-smart queues.
My question is, since a non-subqueue, has a subqueue, how can you tell which which entry in the nodqueue_subqueue table correlates directly to the entry in the nodequeue_queue table?
I'm not totally sure I follow the simple fix for non-smartqueues but I would need to understand how the above works in order to patch with the nodequeue_subqueue_update_title function since that only takes the $sqid and $title as its args.
Thanks in advance ....
Comment #18
ezra-g commentedThe qid column indicates the queue for all subqueues.
Comment #19
jmather commentedI'm not sure if I explained myself appropriately and in this case I'm only concerned with queues that are non-smart queues. I suppose I meant, how do I know what a non-subqueue's/non-smartqueue's correlated subqueue ID is? (Since every queue has a subqueue)
arghh..this should be very simple for non-smartqueues and I think it is, perhaps the reference field in the subqueue? I don't see how we can use nodequeue_subqueue_update_title($sqid, $title) in this case because we don't know what the non-smartqueues subqueue id is...
Comment #20
joachim commentedIt sounds more and more like the whole subqueue system is a mistake -- if it breaks regular, single queues and this hasn't been fixed in over a year :(
Comment #21
ezra-g commented@Joachim: Can you propose a better architecture? What are you talking about when you say "it breaks regular, single queues"?
This bug is actually relatively simple to fix, it seems there just hasn't been enough developer interest to fix it.
Comment #22
joachim commentedWhat I mean by it breaking simple queues is the subject of this bug!
Comment #23
ezra-g commentedAfter taking a quick look at the code, I remembered that the hooks I described already exist -- Each queue owner should implement hook_nodequeue_form_submit() and update their subqueues appropriately.
This four line patch patch does this on behalf of nodequeue.module and in my testing resolves the bug. Smartqueue modules such as Smartqueue_users and smartqueue_og should implement this hook as well.
To fix this completely for the Nodequeue package we'll want to implement this hook for the included smartqueue (taxonomy) module, with an efficient single query to update all of its subqueues, taking into account string replacement.
Perhaps someone with an interest in this bug can follow the model here and finish up the patch?
Marking as NR so folks can confirm this fixes the problem in the simpler case.
Comment #24
joachim commentedWithout patch:
- go to admin/content/nodequeue
- edit a queue
- change name and save
- go to node/NID/nodequeue for a node that's eligible for this queue
- the name has not changed.
With the patch:
- repeat same steps
- name at node/NID/nodequeue has changed.
Patch works for me :)
+1 and thanks ezra!
Comment #25
ezra-g commentedThanks for the testing. This is committed!
Comment #26
joachim commentedCould do with a port to D5.
Will see if I have the time but can't promise anything :(
Comment #27
ezra-g commentedDrupal 5 is no longer a supported core version. This is fixed in 6+