This issue has been created
There is 1 update.
 
 
XWiki Platform / cid:jira-generated-image-avatar-4b61e7d3-bf62-4cc3-aeb1-3e73012de79d XWIKI-25458 Open

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

 
View issue   ·   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-7e824537-d8fa-4121-af3a-05a9e3b64abd Charpentier Lucas created this issue on 22/Oct/26 10:49
 
Summary: The page picker shows the title of another translation of the page on a wiki that is not multilingual
Issue Type: cid:jira-generated-image-avatar-4b61e7d3-bf62-4cc3-aeb1-3e73012de79d Bug
Affects Versions: 18.4.6, 18.8.0
Assignee: Unassigned
Components: REST, Search - Solr
Created: 22/Oct/26 10:49
Priority: cid:jira-generated-image-static-major-fd2580c6-c0ca-4428-8358-81148b939961 Major
Reporter: Charpentier Lucas
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.

The WYSIWYG usability audit of the macros found this with the Display and Include macros.

 
 

1 update

 
cid:jira-generated-image-avatar-7e824537-d8fa-4121-af3a-05a9e3b64abd Changes by Charpentier Lucas on 22/Oct/26 10:51
 
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.

h2. 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.

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

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

h2. 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}}:
{noformat}
/xwiki/rest/wikis/design/spaces/Sandbox/search?q=TestPage1&scope=name&scope=title&number=20&localeAware=true&prettyNames=true
{noformat}
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.

h2. Impact found by the audit
The [ WYSIWYG usability audit of the macros |https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/] found this with it in the page picker of the [ Display |https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/display/] and [ Include |https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/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|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Usability%20criteria/], but it affects every macro parameter that uses the page picker.