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.
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 |
Comment | File | Size | Author |
---|---|---|---|
#1 | nodequeue-fixes-queue-back-1982694-2.diff | 516 bytes | jdillick |
Comments
Comment #1
jdillick CreditAttribution: jdillick commentedProposed patch for nodequeue_queue_back()
Comment #3
fizk CreditAttribution: fizk commentedCommitted, thanks!