Project

General

Profile

Actions

Feature #103403

open

Make it possible to check custom record links with linkvalidator

Added by Sybille Peters about 1 month ago. Updated about 1 month ago.

Status:
Under Review
Priority:
Must have
Category:
Linkvalidator
Target version:
-
Start date:
2024-03-15
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

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.


Related issues 3 (2 open1 closed)

Related to TYPO3 Core - Bug #102468: Linkvalidator doesn't check record/custom links within RTEs at allNew2023-11-22

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

Actions
Related to TYPO3 Core - Task #92693: Deprecate Linktype LinkHandler in linkvalidatorClosedSybille Peters2020-10-23

Actions
Actions #1

Updated by Sybille Peters about 1 month ago

  • Related to Bug #102468: Linkvalidator doesn't check record/custom links within RTEs at all added
Actions #2

Updated by Sybille Peters about 1 month ago

Actions #3

Updated by Philipp Kitzberger about 1 month ago · Edited

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"?

Actions #4

Updated by Sybille Peters about 1 month ago · Edited

  • Assignee set to Sybille Peters
  • Priority changed from Should have to Must have

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.

Actions #5

Updated by Sybille Peters about 1 month ago

  • Related to Task #92693: Deprecate Linktype LinkHandler in linkvalidator added
Actions #6

Updated by Sybille Peters about 1 month ago

  • Description updated (diff)
Actions #7

Updated by Gerrit Code Review about 1 month ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83580

Actions #8

Updated by Gerrit Code Review about 1 month ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83580

Actions #9

Updated by Gerrit Code Review about 1 month ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83580

Actions #10

Updated by Gerrit Code Review about 1 month ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83580

Actions #11

Updated by Gerrit Code Review about 1 month ago

Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83580

Actions

Also available in: Atom PDF