Issue Feature Resolved

#103403Make it possible to check custom record links with linkvalidator

Sybille Peters 03/15/24, 09:45 updated 09/25/26, 23:20

Description

Currently, there is a known problem that RECORD link checking is not possible via the typolink_tag softref parser, see #102468. Because of this, when fixing this issue, one must currently test the record link checking using urls which are not wrapped in an a tag. This can be done for example, by using tt_content.header_link.

e.g. “t3://record?identifier=tx_news&uid=99999”

as described in https://docs.typo3.org/p/georgringer/news/main/en-us/Tutorials/BestPractice/Linkhandler/Index.html#linkhandler

Currently, InternalLinktype::checkLink is called for these types of links, but then it always evaluates to “true” if the target table is not “tt_content” or “pages”:

if (!in_array($table, ['pages', 'tt_content'], true)) {
   return true;
}

https://github.com/TYPO3/typo3/blob/5c95229af666e4ce39dd5a22baecd3390d649c49/typo3/sysext/linkvalidator/Classes/Linktype/InternalLinktype.php#L85

Ideally, the InternalLinktype could handle custom records for other tables as well, e.g. tx_news_domain_model_news.

Reviews 2

History 829

Show 4 earlier messages
  1. Philipp Kitzberger commented <span data-processor="relativetime" data-value="2024-03-19T11:00:03+00:00" > 03/19/24, 11:00 </span>

    Prior to 11.0 those kinda links had been validated by EXT:linkvalidator/LinkType/Linkhandler which was removed with #92693”.

    In those changelogs it says:

    > The LinkHandler link type expects links which start with “record:” – a syntax that is now outdated.

    but in Typolinks docs it still mentions that syntax.

    Who’s right here? I kinda got the feeling that LinkType Linkhandler got removed a bit overhasty? Maybe renaming it to RecordLinkType would’ve been the more correct way to say goodbye to the old term “linkhandler”?

  2. Sybille Peters commented and changed assigned to Sybille Peters priority Should have Must have <span data-processor="relativetime" data-value="2024-03-20T10:26:42+00:00" > 03/20/24, 10:26 </span>

    You are right, it was removed. Thanks for pointing that out. As the author of that patch I feel responsible and will look into it.

    I suspect the following (preliminary): At that time (v11.5), the InternalLinkType would have handled format like “t3://record?identifier=tx_news&uid=99999” and the handled format in LinkHandler was indeed obsolete. But in later versions, InternalLinktype handles only table pages and tt_content as mentioned above.

    Unfortunately, we do not have tests for this and it is not documented very well, otherwise it might have been noticed earlier.

    todos:
    - check if this is working in v11
    - check affected versions
    - add functionality
    - add tests

    Hopefully, this can be backported as bugfix, otherwise have to find other solution, e.g. create external extension as supplement.

  1. Sybille Peters commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-09-25T23:20:17+00:00" > 09/25/26, 23:20 </span>

    Applied in changeset commit:60f5841169181f3fbc419007b3422a91b081bcb4.