Bug #95860
closedTCEMAIN.preview of root page overrides TCEMAIN.preview of sysfolder once the Button "Preview" is clicked
0%
Description
TYPO3 11.5.2
I have general news in folder 57, they should be displayed on detail page 59
When I add the following TSconfig to my root page this works fine:
TCEMAIN.preview { tx_news_domain_model_news { previewPageId = 59 useDefaultLanguageRecord = 0 fieldToParameterMap { uid = tx_news_pi1[news] } additionalGetParameters { tx_news_pi1.controller = News tx_news_pi1.action = detail } } }
Now I added another folder, lets say folder 67 wich should display the preview News on detail page 69 According to docu I have to add the TCEMAIN.preview to both pages 67 and 69. So I added the following to both pages::
TCEMAIN.preview { tx_news_domain_model_news { previewPageId = 69 } }
When I open a news record in folder 67 and debug the html of the preview button the link is correctly pointing to the news display on page 69. If I rightclick the Button and choose "Open in new tab" I will get the correct link opened. However if I just LEFT-Click the preview button The link from the button changes from pointing to page 69 to pointing to page 59. And then the link opens in the wrong location. The preview button stays on this, wrong, link. Once I save or close and open the record once more the correct link is displayed until I LEFT-CLICK the preview button. So I think there must be some JavaScript involved here.
Upon debugging the TYPO3 backend I noted that clicking the preview button on the news record will call function TYPO3\CMS\Backend\Controller\EditDocumentController->getPreviewUrlParameters(1), 1 being the uid of my root page. I could, however not find out in debugging why this is called.