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

Language hooks hot deploy: a property file with a not configured language will overwrite default language property file

    Details

      Description

      Language hooks hot deploy: a property file with a not configured language will overwrite default language property file

      For example:

      <hook>
          <language-properties>Language.properties</language-properties>
          <language-properties>Language_bb_BB.properties</language-properties>
          <language-properties>Language_es_ES.properties</language-properties>
      </hook>
      

      HookHotDeployListener.initLanguageProperties code will do the following:

      1. Language.properties ==> will be detected as locale = null and readed as baseLanguageProperties because filename has no language code
      2. Language_bb_BB.properties ==> will be detected as locale = null because language code "bb_BB" is not configured at portal-ext.properties and will overwrite previoust baseLanguageProperties
      3. Language_es_ES.properties ==> will be detected as locale = es_ES

      Steps to reproduce

      1. Create a language hook with a valid and a invalid language, for example:
        <hook>
            <language-properties>content/Language_bb_BB.properties</language-properties>
            <language-properties>content/Language_es_ES.properties</language-properties>
        </hook>
        
      2. Activate DEBUG level traces for com.liferay.portal.deploy.hot.HookHotDeployListener
      3. Install language hook
        • Expected behaviour: bb_BB is ignored. Following trace is written to log: Ignoring content/Language_bb_BB.properties

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  3 years, 36 weeks ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 CE RC1