Not sure if anyone else has experienced this, but for some reason I have 2 nodequeues setup and one displays the queue tab and node links fine, while the other does not? From what I can tell everything is the same about each and they are referencing the content types to add to the queue in the same way. When I add another content type to the queue that works, the tab and links show up fine?

I don't think it's really related, but the queues are being created in a feature .install file with the following code:

  // Create Nodequeues 
  $nodequeue = new stdClass;
  $nodequeue->api_version = 2;
  $nodequeue->name = 'featured_blogs';
  $nodequeue->title = 'Featured Blogs';
  $nodequeue->subqueue_title = '';
  $nodequeue->size = 5;
  $nodequeue->link = 'Add to featured blogs';
  $nodequeue->link_remove = 'Remove from featured blogs';
  $nodequeue->owner = 'nodequeue';
  $nodequeue->show_in_ui = 1;
  $nodequeue->show_in_tab = 1;
  $nodequeue->show_in_links = 1;
  $nodequeue->reference = '0';
  $nodequeue->reverse = 0;
  $nodequeue->i18n = 0;
  $nodequeue->roles = array(
    0 => '4',
    1 => '5',
  );
  $nodequeue->types = array(
    0 => 'blogs',
  );
  $nodequeue->add_subqueue = array(
    1 => 'Featured Blogs',
  );

  nodequeue_save($nodequeue);

Comments

jmuzz’s picture

Issue summary: View changes

I had the same problem. When looking at the nodequeue_subqueue table I noticed the working queues had 'reference' and 'name' values that were the same. The broken one had the right name but the reference was just the number 1. The access test for the nodequeue tab makes the assumption that the reference and the name will be the same in this table, so it was not returning the correct values. I have no idea how my database got to that state, probably something weird with the form submission, but I think your problem can be fixed by changing the subqueue lines to:

  $nodequeue->add_subqueue = array(
    'featured_blogs' => 'Featured Blogs',
  );

The reference you supply should be the same as the queue name because the subqueue name will be set to the queue name automatically. Strangely enough, if you supply a reference of 0 it will get set to the queue name automatically so you could also do that.

Alternatively you can update the nodequeue_subqueue table yourself.

update nodequeue_subqueue set reference='featured_blogs' where name='featured_blogs';

I think the access check shouldn't make this assumption as the reference and the subqueue name won't always be the same as this example shows. Also, if a reference isn't supplied to nodequeue_add_subqueue the default behavior should be to set the reference to the queue name and not the queue id, since that is what other parts of the code may expect and what it will usually be.