diff --git a/typo3/sysext/backend/Classes/Controller/LinkBrowserController.php b/typo3/sysext/backend/Classes/Controller/LinkBrowserController.php index fe134247c1e8..bc336649dc64 100644 --- a/typo3/sysext/backend/Classes/Controller/LinkBrowserController.php +++ b/typo3/sysext/backend/Classes/Controller/LinkBrowserController.php @@ -164,4 +164,14 @@ protected function getCurrentPageId() } return (int)BackendUtility::getTSCpidCached($browserParameters['table'], $browserParameters['uid'], $pageId)[0]; } + + /** + * Retrieve the configuration + * @return array + */ + public function getConfiguration(): array + { + $tsConfig = BackendUtility::getPagesTSconfig($this->getCurrentPageId()); + return $tsConfig['TCEMAIN.']['linkHandler.']['page.']['configuration.'] ?? []; + } } diff --git a/typo3/sysext/recordlist/Classes/LinkHandler/PageLinkHandler.php b/typo3/sysext/recordlist/Classes/LinkHandler/PageLinkHandler.php index 0db6ca555b45..6b84ebf01642 100644 --- a/typo3/sysext/recordlist/Classes/LinkHandler/PageLinkHandler.php +++ b/typo3/sysext/recordlist/Classes/LinkHandler/PageLinkHandler.php @@ -283,7 +283,8 @@ public function getScriptUrl() public function modifyLinkAttributes(array $fieldDefinitions) { $configuration = $this->linkBrowser->getConfiguration(); - if (!empty($configuration['pageIdSelector']['enabled'])) { + // Depending where the configuration is set it can be 'pageIdSelector' (CKEditor yaml) or 'pageIdSelector.' (TSconfig) + if (!empty($configuration['pageIdSelector']['enabled']) || !empty($configuration['pageIdSelector.']['enabled'])) { $this->linkAttributes[] = 'pageIdSelector'; $fieldDefinitions['pageIdSelector'] = '