I created a nodequeue for my "front page slide" content type. I create a front page slide, and then visit the nodequeue admin page. I type the title in the autocomplete widget, and no options appear. If I visit the node page, and click on the "Nodequeue" tab, I'm able to add the node to the queue that way.

What troubleshooting steps do you suggest I take? No matter how many slide nodes I create, no options ever appear in the autocomplete widget.

Could this be related to the way I created the queue, in a hook_update function? (I'm adding this feature to a production site.) Everything else about the queue seems to work perfectly. The queue is used to sort a views page that displays all the slides. Here's my update code:


/**
 * Add a nodequeue for the front page slideshow
 */
function cc_general_update_6003() {
  module_load_include('module', 'nodequeue');
  $queue = array(
    'title' => 'Front Page Slideshow',
    'size' => 0,
    'reverse' => 0,
    'roles' => array(),
    'types' => array('front_page_slide'),
    'i18n' => 1,
    'show_in_links' => FALSE,
    'show_in_tab' => TRUE,
    'show_in_ui' => TRUE,
    'subqueues' => array(),
    'add_subqueue' => array('Front Page Slideshow'),
    'new' => TRUE,
  );
  $queue = (object) $queue;
  $qid = nodequeue_save(&$queue);
  return array();
}

Comments

amateescu’s picture

Status: Active » Postponed (maintainer needs more info)

I can't see anything wrong with that update function. Some questions:

1) Is your site multilingual?
2) If go to admin/content/nodequeue/[qid]/edit, can you see that node type selected?
3) if you check the nodequeue_types table, is your queue listed there with that specific content type?

Also, note that if you upgrade to 6.x-2.10 you'll also have to set a name for that queue ('name' => 'front_page_slideshow').

amateescu’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Please reopen if you have some more info on this.

jessehs’s picture

Sorry for the late response,

I just took another look at this issue today. (I actually deployed the site with the autocomplete widget broken, since you can add the node using the nodequeue tab on the node page.)

After adding an additional nodequeue manually, and seeing that that one works, I looked at the nodequeue_queue table. The only difference between the two rows (aside from qid and title) is the "owner" column. For the UI-created queue, the owner is set to "nodequeue".

When I set this value on the original row, the auto-complete started working! Voila! I'm going out on a limb here, and I haven't tested it yet, but I think adding another element to the $queue array in the update hook in my original post would solve the problem:

'owner' => 'nodequeue',

I also noticed that the UI created queue has a zero in the "reference" column, whereas the first row has no value. Do you think this will cause any problems?