Project

General

Profile

Actions

Bug #100406

open

EditDocumentController inconsistently not rendering view button on translated root page

Added by Martin Schulz over 1 year ago. Updated about 1 month ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2023-04-03
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
On Location Sprint

Description

When editing a page, the header shows a view button.

However, this is not the case on the root page if selecting any non default language (by dropdown)

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

Internally the reason is thrown as exception but caught and ignored

Tested and verified in:
  • 10.4.36
  • 11.5.24

Files

Actions #1

Updated by Martin Schulz over 1 year ago

  • File deleted (clipboard-202304031443-sdjln.png)
Actions #2

Updated by Martin Schulz over 1 year ago

Screen for working buttons example

Actions #3

Updated by Benni Mack over 1 year ago

  • Sprint Focus set to On Location Sprint
Actions #4

Updated by Friedemann Altrock 4 months ago

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.
Actions #5

Updated by Friedemann Altrock 4 months ago

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

Actions #6

Updated by Gerrit Code Review 4 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85479

Actions #7

Updated by Gerrit Code Review 4 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85479

Actions #8

Updated by Gerrit Code Review 4 months ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85479

Actions #9

Updated by Gerrit Code Review about 1 month ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85479

Actions

Also available in: Atom PDF