Bug #84116

Linkhandler links not rendered in frontend when TSConfig configuration is applied using "registerPageTSConfigFile()" or "addPageTSConfig()"

Added by Jan Kornblum almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2018-03-02
Due date:
% Done:

100%

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

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.

https://www.clickstorm.de/blog/linkhandler-typo3/


Related issues

Related to TYPO3 Core - Bug #82662: TSFE getPagesTSconfig does not use included registered page TSconfigClosedJigal van Hemert2017-10-03

Actions
Related to TYPO3 Core - Bug #81903: DatabaseRecordLinkBuilder is ignoring other settingsClosed2017-07-18

Actions
Has duplicate TYPO3 Core - Bug #84266: DatabaseRecordLinkBuilder doesn't unset $conf['parameter']Closed2018-03-14

Actions
Has duplicate TYPO3 Core - Bug #84287: linkhandler config.recordLinks.tx_news.parameter = 1 failsClosed2018-03-15

Actions
#1

Updated by Georg Ringer almost 3 years ago

  • Status changed from New to Needs Feedback

are you using latest 8.7 version as there has been changes, see #82662

#2

Updated by Georg Ringer almost 3 years ago

  • Related to Bug #82662: TSFE getPagesTSconfig does not use included registered page TSconfig added
#3

Updated by Jan Kornblum almost 3 years ago

Thanks. No, it's 8.7.7. Will upgrade now to 8.7.10 and report here...

#4

Updated by Jan Kornblum almost 3 years ago

Still not working in 8.7.10 ;(

#5

Updated by Riccardo De Contardi almost 3 years ago

  • Status changed from Needs Feedback to New
#6

Updated by Gerrit Code Review almost 3 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

#7

Updated by Markus Klein almost 3 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.

#8

Updated by Jan Kornblum almost 3 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...

#9

Updated by Markus Klein almost 3 years ago

  • Status changed from Under Review to New
  • Target version deleted (8.7.11)
#10

Updated by Markus Klein almost 3 years ago

  • Status changed from New to Needs Feedback
#11

Updated by Wolfgang Wagner almost 3 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.

#12

Updated by Stefan Froemken almost 3 years ago

  • Related to Bug #81903: DatabaseRecordLinkBuilder is ignoring other settings added
#13

Updated by Stefan Froemken almost 3 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

#14

Updated by Gerrit Code Review almost 3 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

#15

Updated by Gerrit Code Review almost 3 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

#16

Updated by Stefan Froemken almost 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#17

Updated by Susanne Moog almost 3 years ago

  • Has duplicate Bug #84266: DatabaseRecordLinkBuilder doesn't unset $conf['parameter'] added
#18

Updated by Benni Mack over 2 years ago

  • Status changed from Resolved to Closed
#19

Updated by Susanne Moog 11 months ago

  • Has duplicate Bug #84287: linkhandler config.recordLinks.tx_news.parameter = 1 fails added

Also available in: Atom PDF