Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-57252

Default locale from DDM localizable fields of DM documents is always modified to the locale of the last editor

    Details

      Description

      7.0.x and master works fine: see comment https://issues.liferay.com/browse/LPS-57252?focusedCommentId=705674&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-705674
      In 6.2.x bug is reproduced


      If a new DM documents that has DDM localizable fields is created, the default locale for these DDM fields will be set to the editor's locale. If another user edits the same DM document then the default locale of its DDM fields will be set to this user's locale.

      Steps to reproduce:

      1. Log in as administrator.
      2. Create a new document type DT1 with this information:
        <root available-locales="en_US" default-locale="en_US">
            <dynamic-element dataType="html" fieldNamespace="ddm" indexType="keyword" localizable="true" name="HTML2094" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-text-html" width="small">
                <meta-data locale="en_US">
                    <entry name="label">
                        <![CDATA]>
                    </entry>
                    <entry name="predefinedValue">
                        <![CDATA[]]>
                    </entry>
                    <entry name="tip">
                        <![CDATA[]]>
                    </entry>
                </meta-data>
            </dynamic-element>
        </root>
        
      3. Change Display Language of administrator to es_ES.
      4. Add a document based on document type DT1 setting its DDM field value to "test language".
      5. Change Display Language of administrator to fr_FR.
      6. Edit the previous DM document.

      Actual result:
      Column xml of DDMContent table has the following value:

      <?xml version="1.0"?>
      
      <root>
          <dynamic-element default-language-id="fr_FR" name="HTML2094">
              <dynamic-content language-id="es_ES"><![CDATA[test language]]></dynamic-content>
              <dynamic-content language-id="fr_FR"><![CDATA[test language]]></dynamic-content>
          </dynamic-element>
          <dynamic-element default-language-id="es_ES" name="_fieldsDisplay">
              <dynamic-content language-id="es_ES"><![CDATA[HTML2094_INSTANCE_wzwl]]></dynamic-content>
          </dynamic-element>
      </root>
      

      Expected result:
      Column xml of DDMContent table has the following value:

      <?xml version="1.0"?>
      
      <root>
          <dynamic-element default-language-id="es_ES" name="HTML2094">
              <dynamic-content language-id="es_ES"><![CDATA[test language]]></dynamic-content>
              <dynamic-content language-id="fr_FR"><![CDATA[test language]]></dynamic-content>
          </dynamic-element>
          <dynamic-element default-language-id="es_ES" name="_fieldsDisplay">
              <dynamic-content language-id="es_ES"><![CDATA[HTML2094_INSTANCE_wzwl]]></dynamic-content>
          </dynamic-element>
      </root>
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Days since last comment:
                  2 years, 51 weeks, 2 days ago

                  Packages

                  Version Package