Issue Bug Closed

#84692Linkhandler configuration in condition results in no links in frontend

Marc Bastian Heinrichs 04/11/18, 15:32 updated 03/25/20, 00:32

Description

Scenario:
  • Multi tree instance with different TSconfigs per tree, also for the linkhandler
Expected:
  • link to the record is generated
Problem:
  • no (!) link is generated

Reason:
DatabaseRecordLinkBuilder::build misses $pageTsConfig[‘TCEMAIN.’][‘linkHandler.’][‘identifier’]

The former linkhandler extensions uses as link identifier the format “identifier:table_name:uid”.
So the TSconfig was not needed in frontend to know the table name.

This was changed in the core implementation to “t3://record?identifier=identifier&uid=uid”.
Thus the page TSconfig needs to be fetched and parsed in frontend.
This done by using TypoScriptFrontendController::getPagesTSconfig() which sadly uses TypoScriptParser::parse without proving an ConditionMatcher.

So the additional TSconfig inside a PIDinRootline condition is totally missing.

Fixes:

Solution A:
double the table configuration from TCEMAIN.linkHandler.fooBar.configuration.table to config.recordLinks.fooBar.table
=> additional pro: no TSconfig parsing in FE

Solution B:
call getPagesTSconfig with new optional argument $matchConditions = true, which results in calling parse providing a ConditionMatcher instance.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.