Bug #103476
closedDisrepancy of returned link type in LinktypeInternal::fetchType
100%
Description
Currently, when calling fetchType for various link types differs if you change the order of the link types.
Also, InternalLinktype always returns "db" link type if the "db" link type is set by the softref parser even if it has no business doing so.
These link types are mutually exclusive:
- "db" => InternalLinktype
- "file" => FileLinktype
- "record" => RecordLinktype (introduced in patch via issue #103403)
However, the softref parsers returns "db" for all of these.
Fixing this may avoid problems further down the line.
Test protocol (by debugging the link types)¶
file link: t3://file?uid=<uid>
-------------------------------------
$softRefEntry
- value['type'] = 'db'
- value['recordRef'] = 'sys_file:94'
- value['tokenValue'] = 'file:94'
- result of fetchType: (order: db, file)
- if class=InternatlLinktype => AbstactLinktype::fetchType: 'db'
- if class=FileLinktype => FileLinkType::fetchType: 'file'
- after changing order: file,db
- if class=FileLinktype => FileLinkType::fetchType: 'file'
sets $value['type'] to 'file'
- if class=InternatlLinktype => AbstactLinktype::fetchType: 'file'
!!!! discrepancy !!! effective type depends on order of evaluation!
BUT if "file" type is in "linktypes, file links will be checked with FileLinktypeif "file" type is not in "linktypes", file links will be checked with InteralLinktype
The result is in most cases still ok, because InternalLinktype refuses to check file links, but it is messy, makes troubleshooting difficult and may cause problems in some scenarios.
Updated by Gerrit Code Review about 1 year 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/+/83581
Updated by Gerrit Code Review about 1 year 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/+/83581
Updated by Gerrit Code Review 11 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/+/83581
Updated by Gerrit Code Review 11 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/+/83581
Updated by Gerrit Code Review 9 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/+/83581
Updated by Gerrit Code Review about 2 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/+/83581
Updated by Gerrit Code Review about 2 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/+/83581
Updated by Gerrit Code Review about 1 month ago
Patch set 1 for branch 13.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88151
Updated by Sybille Peters about 1 month ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset c3d716d54e867fd4323019b6d9b144b826a7800f.