Feature #103403
openMake it possible to check custom record links with linkvalidator
0%
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;
}
Ideally, the InternalLinktype could handle custom records for other tables as well, e.g. tx_news_domain_model_news.
Updated by Sybille Peters 9 months ago
- Related to Bug #102468: Linkvalidator doesn't check record/custom links within RTEs at all added
Updated by Sybille Peters 9 months ago
- Related to Feature #94086: Softref for custom linkhandler added
Updated by Philipp Kitzberger 9 months 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"?
Updated by Sybille Peters 9 months 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.
- patch: https://review.typo3.org/c/Packages/TYPO3.CMS/+/66265
- changelog: https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/11.0/Breaking-92693-RemoveLinkHandlerLinktypeInLinkvalidator.html
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.
Updated by Sybille Peters 9 months ago
- Related to Task #92693: Deprecate Linktype LinkHandler in linkvalidator added
Updated by Gerrit Code Review 9 months 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
Updated by Gerrit Code Review 9 months 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
Updated by Gerrit Code Review 9 months 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
Updated by Gerrit Code Review 9 months 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
Updated by Gerrit Code Review 8 months 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
Updated by Gerrit Code Review 7 months ago
Patch set 6 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
Updated by Gerrit Code Review 7 months ago
Patch set 7 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
Updated by Gerrit Code Review 6 months ago
Patch set 8 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
Updated by Gerrit Code Review 3 months ago
Patch set 9 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
Updated by Gerrit Code Review 3 months ago
Patch set 10 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
Updated by Gerrit Code Review 3 months ago
Patch set 11 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
Updated by Gerrit Code Review 3 months ago
Patch set 12 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
Updated by Gerrit Code Review 3 months ago
Patch set 13 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