Bug #80649
closedIllegal string offset 'linkHandler.' - TYPO3 v 8.6.1
0%
Description
Using the newly integrated linkhandler, a link to a news records throws the following error:
Core: Error handler (FE): PHP Warning: Illegal string offset 'linkHandler.' in /typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php line 6012
The link in the RTE looks like that:
<a href="t3://record?identifier=tx_news&uid=11">Link</a>
The website does not show the link at all.
My page TSconfig:
TCEMAIN.linkHandler.tx_news {
handler = TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler
label = News
configuration {
table = tx_news_domain_model_news
storagePid = 1
hidePageTree = 1
}
scanBefore = page
}
My TYPOscrip setup:
config.recordLinks.tx_news {
forceLink = 0
typolink {
parameter = 2
additionalParams.data = field:uid
additionalParams.wrap = &tx_news_pi1[news]=|&tx_news_pi1[controller]=News&tx_news_pi1[action]=detail
useCacheHash = 1
}
}
So this is more or less the config, which was provided with Feature #79626
Updated by Benni Mack about 7 years ago
- Status changed from New to Needs Feedback
Can you check that with latest master?
Updated by Chris no-lastname-given about 7 years ago
Hm, the master branch gives me
Class 'TYPO3\CMS\Extbase\Service\TypoScriptService' not found Error thrown in file /Users/chris/Sites/_typo3/master/typo3/sysext/core/Classes/Utility/GeneralUtility.php in line 3892.
Updated by Chris no-lastname-given about 7 years ago
Sorry, the cache...
Now I get this errors:
Core: Error handler (FE): PHP Warning: Illegal string offset 'linkHandler.' in /Users/chris/Sites/_typo3/master/typo3/sysext/frontend/Classes/Typolink/DatabaseRecordLinkBuilder.php line 34
Core: Error handler (FE): PHP Warning: Illegal string offset 'TCEMAIN.' in /Users/chris/Sites/_typo3/master/typo3/sysext/frontend/Classes/Typolink/DatabaseRecordLinkBuilder.php line 34
Updated by Thomas Beck about 7 years ago
Hi
Same problem here on TYPO3 8.7
Link looks like
<p><a href="t3://record?identifier=tx_fsmediagallery&uid=2">test</a></p>
But no link in front end and 0 error in logs
Thanks for your help !
Updated by Paul Golmann about 7 years ago
Hello!
I got the same error when starting with clean caches (before the first backend login). I think the DatabaseRecordLinkBuilder
does falsely assume on line 34 that $tsfe->pagesTSconfig
is loaded when it might not be. It should use the getter $tsfe->getPagesTSconfig()
instead.
Greetings
Paul
Updated by Azeef no-lastname-given about 7 years ago
- Category set to Link Handling, Site Handling & Routing
- Priority changed from Should have to Must have
I too confirm the issue in 8.7.0 LTS version. The reason for the issues is as stated by Paul Golmann, i got this working after using the getter... in typo3/sysext/frontend/Classes/Typolink/DatabaseRecordLinkBuilder.php
- $linkHandlerConfiguration = $tsfe->pagesTSconfig['TCEMAIN.']['linkHandler.']; line 34
+ $PageTSconfig = $tsfe->getPagesTSconfig(); line 34
+ $linkHandlerConfiguration = $PageTSconfig['TCEMAIN.']['linkHandler.']; line 35
Updated by Azeef no-lastname-given about 7 years ago
- Related to Bug #80883: Illegal string offset 'TCEMAIN.' in typo3/sysext/frontend/Classes/Typolink/DatabaseRecordLinkBuilder.php line 34 added
Updated by Chris no-lastname-given almost 7 years ago
I think this issue was resolved with #80883.
So this ticket can be closed.
Updated by Wouter Wolters almost 7 years ago
- Status changed from Needs Feedback to Closed
Thanks for the pointer. Your answer is true, this has been solved.