Project

General

Profile

Actions

Bug #95860

closed

TCEMAIN.preview of root page overrides TCEMAIN.preview of sysfolder once the Button "Preview" is clicked

Added by Lina Wolf about 3 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2021-11-03
Due date:
% Done:

0%

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

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.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #96667: Save and preview button uses wrong pagetsClosed2022-01-28

Actions
Related to TYPO3 Core - Bug #98598: Preview is not working for RecordsClosed2022-10-13

Actions
Actions

Also available in: Atom PDF