Issue Bug Closed

#100406EditDocumentController inconsistently not rendering view button on translated root page

Martin Schulz 04/03/23, 12:45 updated 12/02/25, 14:33

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

Tested and verified in:
  • 10.4.36
  • 11.5.24

Reviews 2

Files 4

History 816

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

    Screen for working buttons example

    clipboard-202304031500-pyfb3.png

  2. 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.
  3. 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

  4. Anonymous commented and changed status Under Review Resolved done 0 % 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.