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

Invalid/missing locale information in structure based web content articles after upgrade




      1. Start portal version 6.1.30 and log in as admin
      2. Change the portal's default language in Portal Settings and the user's default language in My Account to 'English (United Kingdom)'
      3. Create a web content structure 'structure1' and add a selection list field with some options
      4. Create a dummy template for structure1
      5. Create a web content article 'article1' based on structure1, and make sure to change the article's default language to 'English (United Kingdom)' before saving it
      6. Create a web content structure 'structure2' with any field e.g. a text field
      7. Shut down the portal and upgrade the database
      8. Log in to upgraded portal
      9. Make sure 'English (United Kingdom)' is set for the portal's and the user's default language

      Issue #1:

      Open article1 for edit

      Result: The selection list field will not be rendered and you will get the error below in the log

      Error on line 14, column 9 in com/liferay/portlet/dynamicdatamapping/dependencies/alloy/option.ftl
      field.getValue(requestedLocale, parentValueIndex) is undefined.

      Reason: The dynamic content elements of journal articles don't have locale information after the upgrade, and the code in this case tries to get the en_US value by default, but it does not exist in our case (only en_GB).

      Issue #2:

      Open structure2 for edit and save it without any modification

      Result: You will get an error on the UI saying 'Please enter a valid name', and the structure will not be saved

      Reason: The root element of journal structures always get en_US as default locale when converting them to DDM structures during the 6.2 upgrade, because LocaleThreadLocal._siteDefaultLocale is being set to the original default locale (en_GB) only after the upgrade has been done.


          Issue Links



              shitian.zhang Shitian "Shelton" Zhang (Inactive)
              gergely.mathe Gergely Mathe (Inactive)
              Participants of an Issue:
              Recent user:
              Marta Elicegui
              0 Vote for this issue
              1 Start watching this issue


                Days since last comment:
                8 years, 2 weeks, 2 days ago


                  Version Package
                  6.2.2 CE GA3
                  6.2.X EE
                  7.0.0 M1