#111409List module: page translations are listed below the wrong default-language page when the language filter is active
Description
Description
With the language filter introduced in #103258, the Records (list) module lists page translations as separate rows in the main query and only nests the remaining translations below their default-language record. The main query is ordered by the `sortby` field only (`pages.sorting`).
A page translation always has the same `sorting` value as its default-language page. For records with the same `sorting` value, the database may return them in any order. When a translation is returned before its default-language page, it is rendered below the previous default-language page. Later, the nesting loop skips it because it is already in the result set (`$resultSetUids`). The translation then appears
to belong to the wrong page.
The data is correct (`l10n_parent`, `sys_language_uid` and `sorting` are fine). Frontend, page tree and page module are not affected. The same data was displayed correctly in TYPO3 v12.
Steps to reproduce
1. Create a folder or page with several subpages in the default language (A, B, C) and translate them into a second language (A’, B’, C’). The translations get the same `sorting` value as their originals, e.g. B = B’ = 2176.
2. Open Content > Records on the parent page and select the default language and the second language in the language filter
(`/typo3/module/content/records?id=<pid>&table=pages&languages<sup class="footnote" id="fnrev7036252966b0213add13d3-1"><a href="#fn7036252966b0213add13d3-1">0</a></sup>=0&languages<sup class="footnote" id="fnrev7036252966b0213add13d3-2"><a href="#fn7036252966b0213add13d3-2">1</a></sup>=1`).<br> 3. Depending on the order MySQL returns for rows with the same `sorting` value, some translations show up before their original. In our case this happened for 1 of 37 rows on MySQL 8.0:</pid>
```
A (lang 0, sorting 2048)
A’ (lang 1, sorting 2048)
B’ (lang 1, sorting 2176) <- shown below A
B (lang 0, sorting 2176)
```
Expected result
Every page translation is listed directly below its default-language page.
Actual result
Translations can be listed below the preceding default-language page, so they appear as translations of the wrong page.
Reviews 2
History 26
-
Gerrit Code Review pushed patch set 1 for main to change 97562 status
NewUnder Review <span data-processor="relativetime" data-value="2026-11-11T20:20:54+00:00" > 11/11/26, 20:20 </span> -
Gerrit Code Review pushed patch set 2 for main to change 97562 <span data-processor="relativetime" data-value="2026-11-18T09:27:37+00:00" > 11/18/26, 09:27 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 97784 <span data-processor="relativetime" data-value="2026-11-18T09:39:37+00:00" > 11/18/26, 09:39 </span>
-
Georg Ringer commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-11-18T09:45:14+00:00" > 11/18/26, 09:45 </span> -
Gerrit Code Review pushed patch set 2 for 14.3 to change 97784 status
ResolvedUnder Review <span data-processor="relativetime" data-value="2026-11-18T11:37:59+00:00" > 11/18/26, 11:37 </span> -
Georg Ringer commented and changed status
Under ReviewResolved <span data-processor="relativetime" data-value="2026-11-18T13:55:14+00:00" > 11/18/26, 13:55 </span>Applied in changeset commit:11bea40c871412acd2e5b1ca2ae836812cd7d239.
Applied in changeset commit:2ba2c652eb14980ff65ef37ce82b976d21832e79.