Details
Description
relationlist datatype stores related object information that includes version number.
the datatype's metadata function pulls by version, for example.
$attributes = $object->contentObjectAttributes( true, $subObjectVersion, $language );
this is used to index content in some search engines such as ezfind.
Several consequences: attribute content is not accurately stored in ezfind, and if ezpublish has been set up to discard version after a certain number have built up, the version specifically identified by the relationlist datatype may no longer exist and search indexing fails completely.
This can be fixed by using the most recent object by language:
$attributes = $object->contentObjectAttributes( true, false, $language );
Steps to reproduce
Create a class with a relationlist attribute.
Create an object (Object1) of that class. Use relationlist attribute to relate to another object (Object2)
modify ezpublish so it only stores 1 version of published objects
edit and publish a new version of Object2
update search index - object relation will no longer be in solr db
Attachments
Issue Links
- duplicates
-
EZP-22636 Object Relations versions not saved correctly
- Closed