Project

General

Profile

Actions

Bug #84692

closed

Linkhandler configuration in condition results in no links in frontend

Added by Marc Bastian Heinrichs over 6 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Target version:
-
Start date:
2018-04-11
Due date:
% Done:

0%

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

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.


Files


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #89718: Unified PageTS resolving and parsingClosedBenni Mack2019-11-21

Actions
Actions #1

Updated by Marc Bastian Heinrichs over 6 years ago

  • File 84692_b.patch added

A patch for B

Actions #3

Updated by Markus Klein over 6 years ago

I'm for Solution B.

Keep the config central at one place.

Actions #4

Updated by Marc Bastian Heinrichs over 6 years ago

  • File deleted (84692_b.patch)
Actions #6

Updated by Julian Stock about 6 years ago

Marc Bastian Heinrichs wrote:

Updated B

any updates on this?

Actions #7

Updated by Julian Stock about 6 years ago

As a workaround, we solved it like this in tsconfig: (Set a default and remove it where the condition is accepted, so you don't have the tab on other rootlines :))

TCEMAIN.linkHandler.tx_news {
    handler = TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler
    label = Your label
    configuration {
        table = tx_news_domain_model_news
        storagePid = 1337
        hidePageTree = 1
    }

    scanBefore = page
}

[Vendor\Package\TypoScriptCondition\YourCondition]
    TCEMAIN.linkHandler.tx_news >
[END]
Actions #8

Updated by Susanne Moog about 6 years ago

  • Sprint Focus set to On Location Sprint
Actions #9

Updated by Susanne Moog almost 5 years ago

  • Sprint Focus deleted (On Location Sprint)
Actions #10

Updated by Markus Klein almost 5 years ago

  • Status changed from New to Needs Feedback

If I'm not mistaken this is resolved with https://review.typo3.org/c/Packages/TYPO3.CMS/+/62349 for v10

Actions #11

Updated by Georg Ringer over 4 years ago

  • Status changed from Needs Feedback to Closed

closed because works now in 10 with #89718

please get in contact me if still not working for you.

Actions #12

Updated by Georg Ringer over 4 years ago

  • Related to Feature #89718: Unified PageTS resolving and parsing added
Actions

Also available in: Atom PDF