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

Adding new class attribute in multilanguage setup does not work

    XMLWordPrintable

Details

    Description

      Adding a new attribute to a class with objects in several languages does not work.
      One symptom is that an information collector class will break, because objects with a required field added will not display this attribute or an error, but do not continue due the missing data.
      Looking at the database will show the problem.
      Executing this SQL:

      select ezcontentobject_attribute.contentclassattribute_id, ezcontentobject_attribute.language_code, ezcontentobject_attribute.language_id,ezcontentobject_attribute.version from ezcontentobject_attribute where ezcontentobject_attribute.contentobject_id=69 and contentclassattribute_id=202
      

      A correct attribute will give this result:

      +--------------------------+---------------+-------------+---------+
      | contentclassattribute_id | language_code | language_id | version |
      +--------------------------+---------------+-------------+---------+
      |                      202 | eng-GB        |           3 |       1 |
      |                      202 | chi-CN        |           4 |       2 |
      |                      202 | eng-GB        |           3 |       2 |
      |                      202 | chi-CN        |           4 |       3 |
      |                      202 | dan-DK        |           8 |       3 |
      |                      202 | eng-GB        |           3 |       3 |
      |                      202 | chi-CN        |           4 |       4 |
      |                      202 | dan-DK        |           8 |       4 |
      |                      202 | eng-GB        |           3 |       4 |
      |                      202 | fre-FR        |          32 |       4 |
      |                      202 | chi-CN        |           4 |       5 |
      |                      202 | dan-DK        |           8 |       5 |
      |                      202 | eng-GB        |           3 |       5 |
      |                      202 | fre-FR        |          32 |       5 |
      +--------------------------+---------------+-------------+---------+
      
      
      

      A newly added attribute this:

      +--------------------------+---------------+-------------+---------+
      | contentclassattribute_id | language_code | language_id | version |
      +--------------------------+---------------+-------------+---------+
      |                      280 | eng-GB        |           2 |       1 |
      |                      280 | chi-CN        |           2 |       2 |
      |                      280 | eng-GB        |           2 |       2 |
      |                      280 | chi-CN        |           2 |       3 |
      |                      280 | dan-DK        |           2 |       3 |
      |                      280 | eng-GB        |           2 |       3 |
      |                      280 | chi-CN        |           2 |       4 |
      |                      280 | dan-DK        |           2 |       4 |
      |                      280 | eng-GB        |           2 |       4 |
      |                      280 | fre-FR        |           2 |       4 |
      |                      280 | chi-CN        |           3 |       5 |
      |                      280 | dan-DK        |           3 |       5 |
      |                      280 | eng-GB        |           3 |       5 |
      |                      280 | fre-FR        |           3 |       5 |
      +--------------------------+---------------+-------------+---------+
      
      
      

      Ass seen the language id is 2 on every language, but it should depend on the language_code.

      Attachments

        Activity

          People

            amos amos
            dis dis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: