After upgrading Nodequeue from 6.x-2.9 to 6.x-2.10, fatal errors occurred when trying to edit existing nodequeues:

Fatal error: Call to undefined function nodequeue_arrange_subqueue() in /var/aegir/platforms/my_d6_platform/sites/all/modules/patched/smartqueue_users/includes/pages.inc on line 72

I tracked down the function and it appears to have moved from the nodequeue.module file to includes/nodequeue.admin.inc.

Attached is a patch which adds three lines to check if the function exists (it should do prior to 6.x-2.10 of nodequeue) and if not, it loads the new nodequeue.admin.inc file.

Comments

siliconmeadow’s picture

StatusFileSize
new681 bytes

The patch is attached to this comment.

jamsilver’s picture

Status: Needs review » Needs work
+++ b/includes/pages.inc
@@ -66,6 +66,9 @@ function smartqueue_users_subqueue_view($account, $queue, $subqueue) {
+          include_once('./' . drupal_get_path('module', 'nodequeue') . '/includes/nodequeue.admin.inc');

This is good, but you probably should use module_load_include('inc', 'nodequeue', 'includes/nodequeue.admin') instead.

Powered by Dreditor.

siliconmeadow’s picture

StatusFileSize
new713 bytes

Thanks jamsilver - I've just updated the patch to use module_load_include instead and have tested it in my environment. Attached is the new version, should anyone be interested in using it. I hope that somehow smartqueue gets some love, particularly the 2.x branch because it is quite useful.

siliconmeadow’s picture

Status: Needs work » Needs review
Juan C’s picture

Subscribe. 'Page not found' for patch on #3.

siliconmeadow’s picture

StatusFileSize
new713 bytes

Very strange - I have no idea how that could happen. Here it is again.

siliconmeadow’s picture

Ok, something weird going on here. It's not a huge patch so here it is inline:

diff --git a/includes/pages.inc b/includes/pages.inc
index 55d5dd5..165a0c3 100644
--- a/includes/pages.inc
+++ b/includes/pages.inc
@@ -1,4 +1,4 @@
-<?php
+g<?php
 
 /**
  * @file pages.inc
@@ -66,6 +66,9 @@ function smartqueue_users_subqueue_view($account, $queue, $subqueue) {
   if (smartqueue_users_can_manipulate($account)) {
     switch ((int)_smartqueue_users_settings_get('manipulation_method', $queue->qid)) {
       case SMARTQUEUE_USERS_MANIPULATION_UI:
+        if (!function_exists('nodequeue_arrange_subqueue')) {
+          module_load_include('inc', 'nodequeue', 'includes/nodequeue.admin');
+        }
         $output .= nodequeue_arrange_subqueue($queue, $subqueue);
         break;
         
vegantriathlete’s picture

@siliconmeadow:

Looking at your patch above it appears that you fat-fingered and placed a "g" before the opening <?php

vegantriathlete’s picture

@siliconmeadow:

I'm diving in to create a D7 version of this module and am currently in the process of reviewing existing code. I'm deciding whether to use the 6.x-1.x or 6.x-2.x branch. As it seems you use this module, I'd like your opinion on things. Please jump in the issue queue.