Details
-
Bug
-
Resolution: Duplicate
-
High
-
None
-
3.9.4
-
None
-
Tested in 3.9.3 but probably affects all versions.
Description
eZContentObject::fetch() does not respect prioritized language for the "name" attribute.
eZContentObject::fetch() creates an SQL which returns a row containing a name as it is stored in the "ezcontentobject" table. When creating an object based on this row, this name is stored in the instance's "Name" property. Fetching the "name" attribute (using ...->attribute( 'name' )) returns value of this property instead of trying to find a correct name in the "ezcontentobject_name" table.
Steps to reproduce
Create a site with 2 languages, say English and Norwegian. Create and publish an object in English language. Add Norwegian translation using a different title. On the site which has Norwegian as the most prioritized langauge, fetch this object (for example in PHP code) and then print the value of the "name" attribute.
Attachments
Issue Links
- duplicates
-
EZP-11055 $object.name and $node.name not translated
- Closed