Closed (fixed)
Project:
Nodequeue
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Feb 2009 at 15:39 UTC
Updated:
4 Aug 2011 at 20:01 UTC
Hi,
I tried generating nodequeue assignments for a taxonomy queue with two empty subqueues. After generation, there're 10 nodes in each subqueue. Some of the nodes appeared more than once in each subqueue. After clicking "Generate" again, I got 20 nodes in each subqueue and 30 after clicking "Generate" the third time.
Note that each subqueue should have a different number of nodes in it.
Comments
Comment #1
ball.in.th commentedPlease ignore this sentence in the issue:
After clicking "Generate" again, I got 20 nodes in each subqueue and 30 after clicking "Generate" the third time.
Comment #2
ezra-g commentedHmm. First, I see that the query that returns the nids to be added to a taxonomy smartqueue are hardcoded into nodequeue_generate.module (line 119
elseif ($queues[$subqueue->qid]->owner == 'smartqueue_taxonomy') {rather than being implemented as a hook, which is more appropriate.Secondly, the query used is problematic: Rather than using a single "SELECT DISTINCT...WHERE {term_node.tid} IN(...)", query, it uses "WHERE term_node.tid =", and then loops over the results,without checking whether the nid is a duplicate, so you'll get duplicate nodes where a single node is assigned multiple terms.
I'd accept a patch for this, though I don't see myself fixing it in the immediate short term.
Comment #3
amateescu commentedFixed in 7.x-2.x with http://drupalcode.org/project/nodequeue.git/commit/a22351b.