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

Wrong custom field language is shown when creating an asset

Details

    Description

      Steps to reproduce

      1. Go to Global Menu > Control Panel tab > Sites session > Custom Fields item
      2. Create a new Document custom field, choosing type Text Area
      3. Mark the Make Field Localizable checkbox
      4. In the localization button to the right of the Starting Value, choose es-ES as the locale
      5. Fill the Starting Value box with value "in Spanish"
      6. Field Name: CF1
      7. Save
      8. Go to side panel menu: Content & Data > Documents and Media
      9. Add a new document by clicking on the + button > File Upload
      10. Change the URL locale to Spanish by adding an /es after the hostname (between localhost:8080 and /group, for example)
      11. Open the CUSTOM FIELDS collapsible section to show the custom fields

      Expected behavior

      The custom field CF1 shows the Spanish starting value and the button has the es-ES locale chosen. If another valid locale is chosen instead of es-ES, the locale button will change accordingly. This behaviour can be achieved if users add also a traslation for the default language, so we need to warn them about it, so an intermediate step should be followed:

       5.a. Add a value for the default language.

      If not, an error message should be displayed in the UI.

       Actual behavior

      The custom field CF1 shows the Spanish starting value and the button has the en-US locale chosen regardless of the locale chosen.

      Reproduced in
      7.2.x: commit 872d2e89aa00ac80da203fc5ddee41436cf1f4bb
      7.3.x: commit 2e82cd6ee20eb9496f3facbdfb73459a33bcf746
      Master: commit fe4dba4a3ba06aa388de4cd1c9ff67e31b7d5791

      Attachments

        Activity

          People

            team-core-infrastructure Product Team Core Infrastructure
            cleydyr.albuquerque Cleydyr Albuquerque (Inactive)
            Bruno Falcao Bruno Falcao
            Cristina Rodriguez Cristina Rodriguez
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              26 weeks, 1 day ago

              Packages

                Version Package