Hi there,
I'm having a few problems with cron, and not quite sure how to debug them. We've recently moved a test site to a production site, with a slightly different confirguration (PHP 5.3 -> 5.2). Not sure if that is the cause, but suddenly seeing several dblog errors everytime cron is scheduled to run.
The content of the errors is:
------------------
Location: http://site/cron.php
Message: Object of class stdClass could not be converted to string in /home/site/modules/node/node.module on line 1845.
Severity: error
------------------
Which I looked up, and appears to be related to indexing a node (line 1845 is "$text .= $t;"):
function _node_index_node($node) {
$node = node_load($node->nid);
// save the changed time of the most recent indexed node, for the search results half-life calculation
variable_set('node_cron_last', $node->changed);
// Build the node body.
$node->build_mode = NODE_BUILD_SEARCH_INDEX;
$node = node_build_content($node, FALSE, FALSE);
$node->body = drupal_render($node->content);
$text = '<h1>'. check_plain($node->title) .'</h1>'. $node->body;
// Fetch extra data normally not visible
$extra = node_invoke_nodeapi($node, 'update index');
foreach ($extra as $t) {
$text .= $t;
}
// Update index
search_index($node->nid, 'node', $text);
}Just wondering if anyone out there might be able to give me an indication of what Drupal is trying to do here (preparing the rendered node content for search indexing?), and what the best way to debug it might be. It appears to be preventing cron from completing, and stopping new nodes being added to the search index so would like to get it sorted.
Any help would be greatly appreciated!
Thanks,
Matt
Comments