Bug #100406
openEditDocumentController inconsistently not rendering view button on translated root page
0%
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
- 10.4.36
- 11.5.24
Files
Updated by Martin Schulz over 1 year ago
- File deleted (
clipboard-202304031443-sdjln.png)
Updated by Martin Schulz over 1 year ago
Screen for working buttons example
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.
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
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
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
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
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