When I'm on a node edit page and click the nodequeue tab, I only see the first queue that the node is available to be put into.

Looks like the problem is in: nodequeue_load_subqueues_by_reference

Specifically:
foreach ($references as $qid => $reference) {
if ($where) {
$where .= ' OR ';
}
$where .= 's.qid = :qid AND s.reference IN (:reference)';
$query->where($where, array(':qid' => $qid, ':reference' => $reference));
}

This SQL is only returning the first queue, not subsequent ones.

Comments

berenddeboer’s picture

Same here.

berenddeboer’s picture

Status: Active » Needs review
StatusFileSize
new821 bytes

Here a patch. Not sure how cleanly it applies to the released dev version as I have added more patches.

berenddeboer’s picture

Priority: Normal » Major
kevin p davison’s picture

Still seems to be an issue in 7.x-2.x-dev Dec 27. I can only see one Nodequeue when I have several for this content type.

Status: Needs review » Needs work

The last submitted patch, nodequeue-load-subqueues.patch, failed testing.

Scott Reynolds’s picture

Status: Needs work » Needs review
StatusFileSize
new1.05 KB

Here is a nicer patch using db_conditions properly

slashrsm’s picture

Status: Needs review » Reviewed & tested by the community

Works great for me.

willmoy’s picture

#6: nodequeue_973404.patch queued for re-testing.

willmoy’s picture

Confirm RTBC

merlinofchaos’s picture

There's an extra db_and() in here that's unnecessary:

      $queues->condition(db_and()
        ->condition('s.qid', $qid)
        ->condition('s.reference', $reference, 'IN'));

Should just be

      $queues->condition('s.qid', $qid)->condition('s.reference', $reference, 'IN');
merlinofchaos’s picture

Ignore #10. I am wrong.

merlinofchaos’s picture

Status: Reviewed & tested by the community » Fixed

Committed a patch that is substantially the same as Scott's; I wrote it before I found this issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.