Bug #102468


Linkvalidator doesn't check record/custom links within RTEs at all

Added by Philipp Kitzberger 7 months ago. Updated 3 months ago.

Should have
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


I was wondering why EXT:linkvalidator 11 wasn't checking "record links" and "custom link types" and found this after debugging the matter a while.

There's a big switch statement in TypolinkSoftReferenceParser (which is used for typolink fields such as tt_content.header_link):

switch ((string)$tLP['type']) {
    case LinkService::TYPE_EMAIL:
    case LinkService::TYPE_TELEPHONE:
    case LinkService::TYPE_URL:
    case LinkService::TYPE_FOLDER:
    case LinkService::TYPE_FILE:
    case LinkService::TYPE_PAGE:
    case LinkService::TYPE_RECORD:
        $event = new AppendLinkHandlerElementsEvent($tLP, $content, $elements, $idx, $tokenID);
In Typolink*Tag*SoftReferenceParser (which is being used for RTE fields such as tt_content.bodytext) that switch statement is slightly smaller:
if ($linkDetails['type'] === LinkService::TYPE_FILE && preg_match('/file\?uid=(\d+)/', $matches[1], $fileIdMatch)) {
} elseif ($linkDetails['type'] === LinkService::TYPE_PAGE && preg_match('/page\?uid=(\d+)#?(\d+)?/', $matches[1], $pageAndAnchorMatches)) {
} elseif ($linkDetails['type'] === LinkService::TYPE_URL) {
} elseif ($linkDetails['type'] === LinkService::TYPE_EMAIL) {
} elseif ($linkDetails['type'] === LinkService::TYPE_TELEPHONE) {
Unfortunately the latter is neither covering TYPE_FOLDER & TYPE_RECORD nor dispatching the event for handling custom linkhandlers.

Related issues 2 (2 open0 closed)

Related to TYPO3 Core - Feature #94086: Softref for custom linkhandlerNeeds Feedback2021-05-07

Related to TYPO3 Core - Feature #103403: Make it possible to check custom record links with linkvalidatorUnder ReviewSybille Peters2024-03-15

Actions #1

Updated by Sybille Peters 3 months ago

Actions #2

Updated by Sybille Peters 3 months ago

I could reproduce this in a TYPO3 v12 installation using news with configured custom linkhandler as described in

I think there are 2 unrelated problems:

1. the link parsing problem you described: custom links with typolink tags (as in RTE records) are not being parsed due to TypolinkTagSoftreferenceParser. I could reproduce this by adding 2 custom links, one as a URL in header_link (t3://record?identifier=tx_news&uid=99999), one by adding a link in the RTE:

<a href="t3://record?identifier=tx_news&amp;uid=99999">broken link to news</a>

I then set a breakpoint in linkvalidator InternalLinktype::checkLink. This will be called if the link is in header_link, not for RTE.

2. There is no Linktype for custom "record" link types in Linkvalidator or rather the InternalLinktype which could also check custom links, does not, it only accepts "pages" and "tt_content". For this, I created a seperate issue: #103403

Can you confirm?

Would you like to create a patch for this?

It also seems to me, this used to work, but I am not sure.

IMHO, no 1 (this issue) is not a linkvalidator problem, it is a problem in the core link parsing. This probably also results in no references being created in the reference index. Frontend rendering is not affected.

Actions #3

Updated by Sybille Peters 3 months ago

  • Related to Feature #103403: Make it possible to check custom record links with linkvalidator added

Also available in: Atom PDF