Details
-
Bug
-
Resolution: Fixed
-
Medium
-
4.1.4, 4.2.0, 4.3.0, 4.4.0alpha3
-
None
Description
When we create an object with a relation to a multilingual object, the related object's content is sometimes indexed in a wrong language.
I think it's because of the metaData() function of eZObjectRelationListType class, who doesn't consider the language of the relationlist attribute to get data from the related object
(eZ 4.1 : kernel/classes/datatypes/ezobjectrelationlist/ezobjectrelationlisttype.php:1469
eZ 4.3 : kernel/classes/datatypes/ezobjectrelationlist/ezobjectrelationlisttype.php:1504 )
We should just add the attribute's language to get the related object's metadata :
$attributes = $object->contentObjectAttributes( true, $subObjectVersion );
=>
$attributes = $object->contentObjectAttributes( true, $subObjectVersion, $contentObjectAttribute->attribute( 'language_code' ) );
Steps to reproduce
1. create an object (named *Object 1* ) in French.
2. create an English version of *Object 1*
3. create a new object (named *Object 2) in English, with a relation to **Object 1* (with an //ezobjectrelationlist// attribute)
4. Index *Object 2* in eZ Find
=> the French content of *Object 1* will be indexed within *Object 2* content in solr (we should have the English content)