#100406EditDocumentController inconsistently not rendering view button on translated root page
Description
When editing a page, the header shows a view button.
clipboard-202304031434-muqsm.png
However, this is not the case on the root page if selecting any non default language (by dropdown)
clipboard-202304031435-5otbs.png
- only on root pages
- only in translations
- applies to both translation modes (free & connected)
- only in the details view header … other preview buttons do render and work, e.g.
clipboard-202304031443-sdjln.png
Internally the reason is thrown as exception but caught and ignored
clipboard-202304031439-wlvxh.png
- 10.4.36
- 11.5.24
Reviews 2
Files 4
History 816
-
Martin Schulz changed
clipboard-202304031443-sdjln.png<span data-processor="relativetime" data-value="2023-04-03T12:57:39+00:00" > 04/03/23, 12:57 </span> -
Martin Schulz commented and changed attached clipboard-202304031500-pyfb3.png <span data-processor="relativetime" data-value="2023-04-03T13:00:23+00:00" > 04/03/23, 13:00 </span>
-
Benni Mack changed Sprint Focus On Location Sprint <span data-processor="relativetime" data-value="2023-08-02T14:46:13+00:00" > 08/02/23, 14:46 </span>
-
Friedemann Altrock commented <span data-processor="relativetime" data-value="2024-08-01T20:22:42+00:00" > 08/01/24, 20:22 </span>
This happens because:
- the EditDocumentController uses the SiteFinder on the preview page ID.
- the preview page ID can be set by TSconfig (e.g. for previewing records, such as news), but for pages of doktype=1 it is the page UID itself.
- for translated sub-pages the site is found, because the rootline above the translated page only contains the default language UIDs.
- for a translated root-page this does not work, well it would if there is another site root in the rootline above it.
-
Friedemann Altrock commented <span data-processor="relativetime" data-value="2024-08-01T20:29:09+00:00" > 08/01/24, 20:29 </span>
There are multiple approaches we could take here to fix it.
1. the EditDocumentController could choose the default language page UID as the preview page
2. the PreviewUriBuilder could check the language of the record (although this is only necessary if the page is a site root)
3. the SiteFinder could check if the passed page UID is a site root and a translation, then return the site mapped for the l10n_parent instead -
Gerrit Code Review pushed patch set 1 for main to change 85479 status
NewUnder Review <span data-processor="relativetime" data-value="2024-08-01T21:44:45+00:00" > 08/01/24, 21:44 </span> -
Gerrit Code Review pushed patch set 2 for main to change 85479 <span data-processor="relativetime" data-value="2024-08-02T13:43:17+00:00" > 08/02/24, 13:43 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 85479 <span data-processor="relativetime" data-value="2024-08-02T14:08:50+00:00" > 08/02/24, 14:08 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 85479 <span data-processor="relativetime" data-value="2024-10-18T13:41:31+00:00" > 10/18/24, 13:41 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 85479 <span data-processor="relativetime" data-value="2025-03-28T12:10:47+00:00" > 03/28/25, 12:10 </span>
-
Gerrit Code Review pushed patch set 6 for main to change 85479 <span data-processor="relativetime" data-value="2025-03-28T12:22:31+00:00" > 03/28/25, 12:22 </span>
-
Gerrit Code Review pushed patch set 7 for main to change 85479 <span data-processor="relativetime" data-value="2025-03-30T09:11:24+00:00" > 03/30/25, 09:11 </span>
-
Georg Ringer changed Duplicated by #98176 <span data-processor="relativetime" data-value="2025-04-01T19:44:54+00:00" > 04/01/25, 19:44 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 88893 <span data-processor="relativetime" data-value="2025-04-01T20:10:05+00:00" > 04/01/25, 20:10 </span>
-
Anonymous commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2025-04-01T20:15:09+00:00" > 04/01/25, 20:15 </span>Applied in changeset commit:39356ea7b5af6d8132b8a663b860d2b4c1711fb2.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T14:33:59+00:00" > 12/02/25, 14:33 </span>
Screen for working buttons example
clipboard-202304031500-pyfb3.png