There are 2 comments.
 
 
XWiki Platform / cid:jira-generated-image-avatar-2cdc89d1-df52-483e-9025-40ee61ce2cf0 XWIKI-10384 Reopened

Pages with translations are displayed twice on Main.AllDocs under certain circumstances

 
View issue   ยท   Add comment
 

2 comments

 
cid:jira-generated-image-avatar-81f10fd3-0e15-47ae-ae28-508bba14e6bd Michael Hamann on 30/Jan/26 11:02
 

A possible solution/alternative query for the current language filter would be to re-use what we have in https://github.com/xwiki/xwiki-platform/blob/ec7686a481704df5f40edc6c82d45513d6ad01c5/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/resources/DatabaseKeywordSearchSource.java#L216-L229 (or rather, to move that to the currentlanguage query filter that can then be re-used by DatabaseKeywordSearchSource.

A disadvantage is of course the performance impact.

 
cid:jira-generated-image-avatar-e41cfc43-d0c0-4b73-8e50-e12e796bf1e7 Vincent Massol on 30/Jan/26 11:02
 
It should be noted that this is almost a regression caused by XWIKI-12608: we used to display the "doc.name" column and when we do so the LT display the language next to the name, in parenthesis (see https://github.com/xwiki/xwiki-platform/blob/397f143e918f70e92beb367d6e876effb25bdc2d/xwiki-platform-core/xwiki-platform-livetable/xwiki-platform-livetable-ui/src/main/resources/XWiki/LiveTableResultsMacros.xml#L318-L318). When XWIKI-12608 replaced "doc.name" with "doc.location" this was lost and now the user sees a duplicate :)

A quick workaround is to add the "unique" filter to the LT by default, at https://github.com/xwiki/xwiki-platform/blob/fd2fb6dc14efa0b37e1722df4d73564bc3cbc3a2/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/macros.vm#L126-L126

Note that would still potentially have an issue with the date displayed since it could display the wrong doc; for example if a doc has a default of "en" and a "fr" translation, the one displayed will be either the default doc or fr translation and if it's the "en" one displayed the date will not be the expected one.

See
http https :// markmail www . mail-archive.com/devs@xwiki. org/ message/i2mdm7kse3mrui3w msg31533.html for a brainstorming about the issue.