Details
-
Bug
-
Resolution: Fixed
-
Medium
-
4.2.0
-
None
-
ezp 4.2, ezfind 2.1
Description
When a Solr index contains an object that doesn't exist in the eZ Publish database, and this object is returned in a search result, eZ Publish crashes.
The eZFindResultNode for the bad result is created, but its eZContentObjectTreeNode properties are mostly NULL. The search result listing crashes on eZContentObjectTreeNode::className() because the class cannot be fetched, ending in a "Call to a member function attribute() on a non-object" at this line:
$class = $object->contentClass(); $this->ClassName = $class->attribute( 'name' );
Having the index out of sync is an error situation of itself, but eZ Find should handle it better. It should not return these cases as search results, but rather remove them from the results and log the error.
Steps to reproduce
How to get the index out of sync (untested, not sure if this works):
- Create an article, make sure it is indexed
- Stop ezfind
- Delete the article
Test the issue:
- Restart ezfind
- Search for the deleted object