Bug #84116
closedLinkhandler links not rendered in frontend when TSConfig configuration is applied using "registerPageTSConfigFile()" or "addPageTSConfig()"
100%
Description
Linkhandler links are not rendered in frontend when TSConfig configuration is applied using "registerPageTSConfigFile()" or "addPageTSConfig()". The only way to get it work is applying the configuration using the "Page TSConfig" field in page properties. This is not nice, especially when you want to deploy the configuration automatically for a custom extension.
Updated by Georg Ringer about 6 years ago
- Status changed from New to Needs Feedback
are you using latest 8.7 version as there has been changes, see #82662
Updated by Georg Ringer about 6 years ago
- Related to Bug #82662: TSFE getPagesTSconfig does not use included registered page TSconfig added
Updated by Jan Kornblum about 6 years ago
Thanks. No, it's 8.7.7. Will upgrade now to 8.7.10 and report here...
Updated by Riccardo De Contardi about 6 years ago
- Status changed from Needs Feedback to New
Updated by Gerrit Code Review about 6 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56001
Updated by Markus Klein about 6 years ago
I'm not really sure, what the problem could be. I didn't do any testing yet.
I just saw one thing that is different in FE than in BE and pushed that change as WIP patch. See above.
Updated by Jan Kornblum about 6 years ago
I've just recognized, that on the recently upgraded to 8.7.10 site (like georg suggested), it suddenly seems to work. Although it didn't work yesterday, but maybe that was a cache problem. So perhaps the patch isn't neccessary at all. Could you leave this issue open, i will test it the next days on another site...
Updated by Markus Klein about 6 years ago
- Status changed from Under Review to New
- Target version deleted (
8.7.11)
Updated by Markus Klein about 6 years ago
- Status changed from New to Needs Feedback
Updated by Wolfgang Wagner about 6 years ago
Problem seems to be back in 8.7.11.
In 8.7.10, links to news records are rendered correctly, after updating to 8.7.11, the links are not rendered.
Switched back to 8.7.10 -> rendering works again.
I could reproduce this in 2 separate TYPO3 installations.
BTW, it doesn't matter if I load the TSconfig via ext_localconf.php or write it directly in the TSconfig-field in the page properties.
Updated by Stefan Froemken about 6 years ago
- Related to Bug #81903: DatabaseRecordLinkBuilder is ignoring other settings added
Updated by Stefan Froemken about 6 years ago
With Patch https://review.typo3.org/#/c/56069/2/typo3/sysext/frontend/Classes/Typolink/DatabaseRecordLinkBuilder.php
some new lines were implemented like
$typoScriptConfiguration = array_merge_recursive($typoScriptConfiguration, $conf);
In our case we have
$typoScriptConfiguration['parameter'] = '9568'
and
$conf['parameter'] = 't3://record?identifier=tx_events2_domain_model_event&uid=7287'
which results in
$typoScriptConfiguration['parameter']0 = '9568'
$typoScriptConfiguration['parameter']1 = 't3://record?identifier=tx_events2_domain_model_event&uid=7287'
And yes, this is totally wrong and will throw Warning Exceptions in typoLink Method while trying to call trim on array in:
$linkParameter = trim(isset($conf['parameter.']) ? $this->stdWrap($conf['parameter'], $conf['parameter.']) : $conf['parameter']);
Currently I have two solutions:
Replace
unset($conf['parameter.']);
with
unset($conf['parameter']);
or
Replace:
$typoScriptConfiguration = array_merge_recursive($typoScriptConfiguration, $conf);
with
$typoScriptConfiguration = array_replace_recursive($conf, $typoScriptConfiguration);
Stefan
Updated by Gerrit Code Review about 6 years ago
- Status changed from Needs Feedback to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56152
Updated by Gerrit Code Review about 6 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56166
Updated by Stefan Froemken about 6 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 4d112f05c611b5501691269ece68088065bf2143.
Updated by Susanne Moog almost 6 years ago
- Has duplicate Bug #84266: DatabaseRecordLinkBuilder doesn't unset $conf['parameter'] added
Updated by Susanne Moog about 4 years ago
- Has duplicate Bug #84287: linkhandler config.recordLinks.tx_news.parameter = 1 fails added