Uploaded image for project: 'Content Editor'
  1. Content Editor
  2. CONTEDIT-500

locales country part is not taken into account when resolving jcr blocks by locale

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 2.1.4
    • None
    • None

      in method info.magnolia.editor.block.jcr.MultiJcrBlockEntryResolution#getBlocksByLocale

      only language part of locale is taken into account when filtering nodes. If we are using locale with country part set, filtering doesn't work properly.

      boolean matchSubLocale = StringUtils.endsWith(name, "_" + locale.getLanguage());
      I guess we should change this line with something like:
      boolean matchSubLocale = StringUtils.endsWith(name, "_" + locale.toString());

      module version 2.1.3

      Steps to reproduce:

      • Update language from site to DE e.g: /travel/i18n/locales/de@language 
      • Edit a story > switch language to german > click on Copy blocks from English  > provide value for required fields -> save
        Expected results:
      • Has block values for both languages
        Actual result:
      • There's no value when switching to for German

        Acceptance criteria

              oanh.thai Oanh Thai Hoang
              rdrangovski Riste Drangovski
              AuthorX
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:
                Work Started:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0d
                    0d
                    Logged:
                    Time Spent - 5h 5m
                    5h 5m