Enabled Nodequeue and Subqueue modules

Attempts to add a new nodequeue fail due to query error:

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1: SELECT name, use_parents FROM {smartqueue} WHERE name IN (); Array ( ) in smartqueue_nodequeue_alter() (line 169 of /opt/www/drupal7/sites/all/modules/nodequeue/smartqueue.module).

Smartqueue module has a an alter implementation for the drupal_alter() call in nodequeue_load_queues() in nodequeue.module (invoked in nodequeue_load() in nodequeue_save() in this case) for the 'load_queues' context. This alter implementation does not check to see that the array of queue names has values which in the case of an insert of a new nodequeue it will not.

Patch adds a count() test around the variable that is passed to the query in the alter.

add-nodequeue-save-bug.patch814 bytesjaydub
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es).
[ View ]


amateescu’s picture

Status:Needs review» Fixed

Looks good to me. Committed to 7.x-3.x, thanks!


Status:Fixed» Closed (fixed)

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