blank screen

terrybritton - April 18, 2007 - 17:05
Project:GlobalNode
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

This module is exactly what I need, but after installing it I get a blank screen and none of the pages will load.

#1

budda - April 19, 2007 - 16:27
Status:active» needs review

Error is due to the $aa variable being empty i suspect. I got a PHP error on screen here.

basically you need to go to the settings page and insert some node fields you want to extract.
?q=admin/settings/globalnode

To get the module working I reworked one funtion slightly. Paste this in to the module in place of the existing function by the same name.

function globalnode_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL){
  if(!is_object($GLOBALS['globalnode'])){
    $attributes = variable_get('globalnode_attributes', '');

    if($attributes) {
      $attributes = str_replace(', ', "\n", $attributes);
      $attributes = str_replace(',', "\n", $attributes);
      $attributes = str_replace(';', "\n", $attributes);
      $attributes = array_unique(split("\r\n", $attributes));

      $GLOBALS['globalnode'] = new stdClass();
      switch($op){
        case 'load':
          foreach($attributes as $att){
            if($node->$att){
              $GLOBALS['globalnode']->$att = $node->$att;
            }
          }
          break;
      }
    }
  }
}

#2

budda - April 30, 2007 - 17:28

I rolled this fix in to a real patch over at http://drupal.org/node/140344

#3

dllh - May 6, 2007 - 02:06
Status:needs review» fixed

Thanks for the patch. I've incorporated and checked in.

#4

Anonymous - May 20, 2007 - 02:32
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.