Uploaded image for project: 'Magnolia Diff Module'
  1. Magnolia Diff Module
  2. MGNLDIFF-82

i18n aware comparison doesn't work in multisite environment

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.6.2
    • 1.6.1
    • Yes

      This feature was implemented with MGNLDIFF-74. But there is problem with multisite environment.

      The problem is that VersionDiffHtmlServlet#getVersionSource is generating the default language url (english) rather than the correct url for the locale - one that is prefixed with the locale - (just 'handle' instead of '/fr/handle').

      This happens because i18nContentSupport.toI18NURI(NodeUtil.getPathIfPossible(Node)) is returning the wrong URL - and this is because the actual site is not set on the AggregationState and so AbstractI18nContentSupport.isLocaleSupported() returns false for French. Because French is indeed not in the Locale}}s collection for the {{default site!

      Suggested solution

      Put correct Site on the AggregationState in VersionDiffHTMLServlet.

      To Reproduce
      • In demo-features site, enable i18n
      • Add an additional locale, fr. (This is important because the problem only shows up when the locale is something that is not present in Default site definition.)
      • Edit Page /demo-features/content-templates/article, Edit the title of the "Page Header" component.
        • Make the english version 'Article EN 1', make the french version 'Article FR 1'.
      • Publish the change & Go to the Inbox and Approve the workitem.
      • Edit the page again
        • Make the english version 'Article EN 2'. make the french version 'Article FR 2'.
      • Publish the change.
      • Go to the inbox, double click on the workitem, you'll see links at the bottom to Compare for each language.
      • You'll see that English works correctly, but that French shows the English changes too!

        Acceptance criteria

              pmundt Philip Mundt
              zarko.ivanoski Zarko Ivanoski
              Marcel Stör
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD