Latest Build broke Nodequeue - can't add nodes

irakli - June 12, 2009 - 01:50
Project:Nodequeue
Version:6.x-2.2
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:duplicate
Description

I am getting "Restricted Node - NID: 106" error, for no good reason, when trying to add a new node, with the latest release of nodequeue.

After downgrading to the previous release: the problem is gone!

#1

ezra-g - June 14, 2009 - 01:02
Status:active» postponed (maintainer needs more info)

Could you explain where you are seeing this error and the steps to recreating it?

#2

irakli - June 17, 2009 - 13:13

When I try to add node to a queue from a queue view.

AttachmentSize
Picture 7.png 27.3 KB

#3

psletten - June 22, 2009 - 10:11

There is an error in nodequeue.module in function nodequeue_ajax_add() where the data-element in the return array is populated by a call to function nodequeue_arrange_subqueue_entry(...). This function call is missing an argument telling the function which nids are visible. I've created a patch to fix this error.

AttachmentSize
nodequeue_5.x-2.7.patch 1.53 KB

#4

ezra-g - June 23, 2009 - 17:06
Status:postponed (maintainer needs more info)» duplicate

Thanks for taking the time to roll this patch!

It looks like you changed the query so that it doesn't specify the ASC/DESC order which is necessary for queues that are automatically reversed.

I'm marking this as a duplicate of #483204: Queue Manipulation callbacks not updated from Drupal 5 since it's clear that to fix both of these issues, we need to move the queries for getting restricted and unrestricted lists of nids into the same new helper functions for consistency.

#5

ezra-g - June 23, 2009 - 17:15

@psletten, taking closer look at your patch, it looks like it addresses a separate bug from not being able to add nodes. Can you clarify whether this is the case?

#6

psletten - June 29, 2009 - 12:51

@ezra-g, Sorry no. It addresses the bug about not being able to add nodes. It was impossible to add any nodes via the nodequeue_ajax_add() functionality, and I also got the error "Restricted Node - NID: XXX"

#7

psletten - June 29, 2009 - 11:16

I've removed the ASC/DESC from the SQL in function nodequeue_arrange_subqueue because it did not seem relevant to me. The result is used to create an array with nid as key. So there is really no need to have the database sort the results when the index created is not ordered in the same manner. As far as I can see it will only be relevant if nodequeues can have more than one entry with the same nid. But they can't, can they?

#8

tirdadc - June 29, 2009 - 22:17

Subscribing. If this patch doesn't get incorporated soon, I will have to roll back to a previous version of Nodequeue.

#9

omerida - July 1, 2009 - 16:24

I had the same issue and looked at the patch for 5.x. The array of restricted nids is an optional parameter to the nodequeue_arrange_subqueue_entry function, its defaulted to empty. I think if the array is empty, the assumption is that you do not want to restrict which nodes are displayed. The attached patch adds a test to the if statement that displays the title or the "Restricted Node" message.

AttachmentSize
restricted_nodes.patch 571 bytes

#10

IncrediBody.com - July 1, 2009 - 19:38

Did the upgrade to 2.2 require a database change via update.php? I can't recall, but if there was no database update required, then I will downgrade to 2.1 so I can work on my localhost site until the patch is integrated. If anyone remembers, please let me know. Thanks!

#11

scor - July 8, 2009 - 16:52
Status:duplicate» fixed

fixed with SA-CONTRIB-2009-041.

#12

IncrediBody.com - July 13, 2009 - 06:29

#13

ezra-g - July 16, 2009 - 21:13
 
 

Drupal is a registered trademark of Dries Buytaert.