Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-11586

eZContentObject::fetch() does not respect prioritized language for the "name" attribute

    XMLWordPrintable

Details

    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

        Activity

          People

            unknown unknown
            jk jk
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: