| 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
- On a wiki that is not multilingual, with English as default language, edit a page with the WYSIWYG editor.
- Insert an Include Page macro.
- 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:
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. The WYSIWYG usability audit of the macros found this with the Display and Include macros. |