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.
On the form to generate nodequeue's, if you do not select a queue, you get a DB error because it expects a queue id to be passed in. I added this validate function to make sure the user select at least one queue.
/**
* Validate nodequeue generate form submission.
*
* Check to make sure a queue was selected.
*/
function nodequeue_generate_form_validate($form, &$form_state) {
$qids = array_keys(array_filter($form_state['values']['nodequeues']));
if (count($qids) < 1) {
form_set_error('nodequeues', t('You must select a Queue.'));
}
}
Comments
Comment #1
amateescu CreditAttribution: amateescu commentedCommited to 6.x-2.x and 7.x-2.x. Thanks!
http://drupalcode.org/project/nodequeue.git/commit/5dd50c7
http://drupalcode.org/project/nodequeue.git/commit/be332ab