Uploaded image for project: 'Live Copy'
  1. Live Copy
  2. LIVECOPY-266

Impact defaultLocale on Authoring support

    XMLWordPrintable

Details

    Description

      Steps to reproduce

      1. Import Site configuration and website workspace as attached
      2. Open the pages app of pageB
      3. Delete the defaultLocale of the site config of siteB
      4. open the pages app of pageB again 

      Expected results

      I would expect that the default locale has no impact on the language switch in the pages app. Because pageB has nl as fallback language, I would expect to see Dutch preselected.

      Actual results

      With defaultLocale:

       

      Without defaultLocale:

      Workaround

      Development notes

      Our Partner Dev5310 suggested a fix in the Ticket https://jira.magnolia-cms.com/browse/SUPPORT-13188

      In my opinion this is not really working because without setting the defaultLocale you still get German preselected.

       

      I tried to fix it by my own but i am not sure if this breaks something else. If we would change -> Class → info.magnolia.livecopy.i18n.LiveCopyI18nContentSupport (Line 89 - 92)

      @Override
      public Locale getFallbackLocale() {
          return masterLocale != null ? new Locale(masterLocale) : super.getFallbackLocale();
      }
      
      // INTO
      
      @Override
      public Locale getFallbackLocale() {
          return super.getFallbackLocale() != null ? super.getFallbackLocale() : new Locale(masterLocale);
      }
      

      The problem is gone without the need to set the defaultLocale.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                nguyen.phung Nguyen Phung Chi
                tobias.kerschbaum Tobias Kerschbaum
                Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD

                    Jenkins Builds

                      No builds found.