nodequeue_queue_back() incorrectly reassigns positions. If you are trying to move the top of the queue to the bottom, the top position becomes 2 and there will be two nodes in the bottom position. Say you have 10 nodes in a subqueue:

qid sqid nid position timestamp
2 2 1106 1 1367011961
2 2 886 2 1367011961
2 2 826 3 1367011961
2 2 1026 4 1367011961
2 2 988 5 1367011961
2 2 668 6 1367011961
2 2 746 7 1367011961
2 2 896 8 1367011961
2 2 1112 9 1367011961
2 2 698 10 1367011961

Calling nodequeue_queue_back(2, 1) will result in the following:

qid sqid nid position timestamp
2 2 886 2 1367011961
2 2 826 3 1367011961
2 2 1026 4 1367011961
2 2 988 5 1367011961
2 2 668 6 1367011961
2 2 746 7 1367011961
2 2 896 8 1367011961
2 2 1112 9 1367011961
2 2 698 10 1367011961
2 2 1106 10 1367011961
CommentFileSizeAuthor
#1 nodequeue-fixes-queue-back-1982694-2.diff516 bytesjdillick
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jdillick’s picture

Proposed patch for nodequeue_queue_back()

  • fizk committed fbf5c82 on 7.x-2.x authored by jdillick
    Issue #1982694 by jdillick: nodequeue_queue_back() incorrectly reassigns...
fizk’s picture

Status: Needs review » Fixed

Committed, thanks!

Status: Fixed » Closed (fixed)

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