Closed (fixed)
Project:
Apache Solr Search
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Jun 2012 at 16:40 UTC
Updated:
20 Jun 2012 at 19:32 UTC
When indexing content, I had hundreds of the following error message:
Notice: Undefined property: stdClass::$nid in DatabaseStatementBase->fetchAllAssoc() (line 2166 of [docroot]/includes/database/database.inc).
From debugging, the source of the error appears to be lines 1087-1092 of apachesolr.index.inc, in the function apachesolr_index_node_check_table():
// Check for deleted content that wasn't deleted from the index.
$query = db_select($table, 'aien')
->fields('aien', array('entity_id'))
->isNull('n.nid')
->range(0, ($limit*2));
$query->leftJoin('node', 'n', 'n.nid = aien.entity_id');
$nodes = $query->execute()->fetchAllAssoc('nid');
In that last line, I think the error is happening because nid is null (per the query). Should the line instead read as follows?
$nodes = $query->execute()->fetchAllAssoc('entity_id');
Comments
Comment #1
nick_vhWell caught error, committed to latest dev
Comment #2
nick_vhDoes not apply to 6.x-3.x
Comment #3
nick_vh