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