Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-25458

The page picker shows the title of another translation of the page on a wiki that is not multilingual

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 18.4.6, 18.8.0
    • REST, Search - Solr
    • None
    • Unknown

    Description

      On a wiki that is not multilingual, the page picker, used for example by the page fields of the Edit Macro dialog, can show a page under the title of one of its translations instead of its own title. In the English UI, searching "Test Page 1" suggested "Sandkasten Test Seite 1", the German title of Sandbox.TestPage1, and "TestPage1" suggested "Página de Prueba 1", the Spanish one. The user may not recognize the page they want.

      Steps to reproduce

      1. On a wiki that is not multilingual, with English as default language, edit a page with the WYSIWYG editor.
      2. Insert an Include Page macro.
      3. Type TestPage1 in the page field.

      Expected

      Sandbox.TestPage1 is suggested with its English title "Sandbox Test Page 1".

      Actual

      Sandbox.TestPage1 is suggested with the title of one of its translations, for example "Página de Prueba 1".

      Notes

      The picker calls the REST search with localeAware=true, which should return each page once, in the current locale. On design.xwiki.org, not multilingual, the following request returns 13 results for Sandbox.TestPage1, one per translation, each with its own title, and the same 13 results with localeAware=false:

      /xwiki/rest/wikis/design/spaces/Sandbox/search?q=TestPage1&scope=name&scope=title&number=20&localeAware=true&prettyNames=true
      

      The picker keeps one entry per page, so the title shown is the one of whichever translation it keeps. With number=10, as the picker asks, the last result is the Spanish translation, which matches the title seen in the picker.

      The Solr search source handles localeAware by filtering on the locales field with the current locale, see SolrKeywordSearchSource. That filter keeps every translation in this case.

      Impact found on macro fluidity

      The WYSIWYG usability audit of the macros found it in the page picker of the Display and Include macros. The page is suggested under a title that is neither its title in the current language nor its name, so a user who picks a page by its title can doubt that they picked the right one. Being a bug of the generic page picker, it was not counted against these macros under criterion C4 input-assistance, but it affects every macro parameter that uses the page picker.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Lucas C Charpentier Lucas
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: