From 543f14b66aa5cfd5a9aaaa23b4c39d839eb0517b Mon Sep 17 00:00:00 2001 From: Benni Mack Date: Wed, 26 Apr 2017 20:56:45 +0200 Subject: [PATCH] [BUGFIX] Initialize pagesTSconfig for link handler in FE In TYPO3 v8, $TSFE->pagesTSconfig is only initialized when the frontend editing is active, but the link handler depends on the value of pageTSconfig, for this reason, the method for initializing should be used instead of the public property. Resolves: #80883 Releases: master, 8.7 Change-Id: I6e7519c23f34867850160135ea8798911907338b Reviewed-on: https://review.typo3.org/52619 Tested-by: TYPO3com Reviewed-by: Georg Ringer Tested-by: Georg Ringer Reviewed-by: Thomas Hohn Reviewed-by: Markus Klein Tested-by: Markus Klein --- .../frontend/Classes/Typolink/DatabaseRecordLinkBuilder.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/typo3/sysext/frontend/Classes/Typolink/DatabaseRecordLinkBuilder.php b/typo3/sysext/frontend/Classes/Typolink/DatabaseRecordLinkBuilder.php index ca47842192bd..5655413196ae 100644 --- a/typo3/sysext/frontend/Classes/Typolink/DatabaseRecordLinkBuilder.php +++ b/typo3/sysext/frontend/Classes/Typolink/DatabaseRecordLinkBuilder.php @@ -29,9 +29,10 @@ class DatabaseRecordLinkBuilder extends AbstractTypolinkBuilder public function build(array &$linkDetails, string $linkText, string $target, array $conf): array { $tsfe = $this->getTypoScriptFrontendController(); + $pageTsConfig = $tsfe->getPagesTSconfig(); $configurationKey = $linkDetails['identifier'] . '.'; $configuration = $tsfe->tmpl->setup['config.']['recordLinks.']; - $linkHandlerConfiguration = $tsfe->pagesTSconfig['TCEMAIN.']['linkHandler.']; + $linkHandlerConfiguration = $pageTsConfig['TCEMAIN.']['linkHandler.']; if (!isset($configuration[$configurationKey]) || !isset($linkHandlerConfiguration[$configurationKey])) { throw new UnableToLinkException( -- 2.20.1