Closed (fixed)
Project:
Nodequeue
Version:
7.x-2.x-dev
Component:
Nodequeue Generate
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Sep 2011 at 17:40 UTC
Updated:
4 Oct 2011 at 19:41 UTC
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 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