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

Weird behavior when locales.enabled does not contain en_US (exceptions when starting up portal, unable to import LAR files, etc.)

    Details

      Description

      Description:
      For some reason, the default locale gets assigned to en_US regardless of what the locales.enabled property is set to. This causes numerous exceptions when starting up the portal in master, because it tries to add a bunch of structures, DL File types, layouts, etc. with a default locale of en_US, but then finds that it is not available. This fix will make the default locale an available locale so that these exceptions will not occur and any lar files that reference these structures, file types, layouts, etc. will be able to be imported.

      Steps to reproduce:
      1. Create a new database.
      2. Place these properties in the portal-ext.properties:
      company.default.locale = en_CA
      locales.enabled = en_CA,fr_CA
      3. Start up the portal for the first time.

      Expected result: The portal would start up cleanly with no exceptions.
      Actual result: There is a large host of exceptions (StructureNameException, LayoutNameException, etc.) that is too numerous to list here.

      Reproduced in master: 5a9e384d9fdd1cd2e40985e7cffd1ffbee96bb13
      Have not tested in 6.2.x.

      The below issue was the original issue that I was testing, but it was fixed by the fix for the above issue:

      Steps to Reproduce:
      (Note: I've also attached the LARs I used for testing to this ticket - so you can skip steps 1-7 and use the attached LAR corresponding to the version of Liferay you're testing on for step 10)
      1) Initialize a bundle on a fresh database.
      2) After the first startup completes, shut down the server.
      3) Place these properties in the portal-ext.properties:
      company.default.locale = en_CA
      locales.enabled = en_CA,fr_CA
      4) Start the server.
      5) Navigate to Site Administration and choose Global as the site context.
      6) Create a document of type contract.
      7) Export the LAR.
      8) Start up a fresh bundle with the same properties as above:
      company.default.locale = en_CA
      locales.enabled = en_CA,fr_CA
      9) Navigate to Site Administration and choose Global as the site context.
      10) Try to import the LAR from step 7.

      Expected Result: The LAR imports successfully.
      Actual Results: The LAR fails to import and throws a StructureNameException.

      Reproduced in master: 5a9e384d9fdd1cd2e40985e7cffd1ffbee96bb13
      Reproduced in 6.2.x. 1ab4e0a4c86edd072d28b8dd702d02c98687eba2

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                michael.bowerman Michael Bowerman (Inactive)
                Reporter:
                michael.bowerman Michael Bowerman (Inactive)
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  3 years, 31 weeks, 4 days ago

                  Packages

                  Version Package