Task #92693

Deprecate Linktype LinkHandler in linkvalidator

Added by Sybille Peters 8 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Should have
Category:
Linkvalidator
Target version:
-
Start date:
2020-10-23
Due date:
% Done:

100%

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

Description

This checks links by the extension "linkhandler", which is outdated, see https://extensions.typo3.org/extension/linkhandler/

Additionally, the configuration option and some references in the documentation should be fixed.

#1

Updated by Gerrit Code Review 8 months ago

  • Status changed from New to Under Review

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

#2

Updated by Gerrit Code Review 8 months ago

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

#3

Updated by Gerrit Code Review 8 months ago

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

#4

Updated by Sybille Peters 8 months ago

The ext:linkhandler is outdated, but the functionality was integrated into the core in version 9.5: Feature: #79626 - Integrate record link handler

The question is if the LinkHandler class still works as intended and what kind of links it covers (as external, file and db (internal) are already covered by the other linktypes.

#5

Updated by Sybille Peters 8 months ago

Q: Can LinkHandler linktype be deprecated or even removed?

yes:

The LinkHandler linktype expects links that start with record:

public function fetchType($value, $type, $key)
    {
        if ($value['type'] === 'string' && strpos(strtolower($value['tokenValue']), 'record:') === 0) {
            $type = 'linkhandler';
        }
        return $type;
    }

It apppears, this is outdated in any case:

if ($result['type'] === LinkService::TYPE_RECORD) {
                [$a['identifier'], $tableAndUid] = explode(':', $linkHandlerValue, 2);
                $tableAndUid = explode(':', $tableAndUid);
                if (count($tableAndUid) > 1) {
                    $a['table'] = $tableAndUid[0];
                    $a['uid'] = $tableAndUid[1];
                } else {
                    // this case can happen if there is the very old linkhandler syntax, which was only record:<table>:<uid>
                    $a['table'] = $a['identifier'];
                    $a['uid'] = $tableAndUid[0];
                }
                $result = array_merge($result, $a);
            }


typo3/sysext/core/Classes/LinkHandling/LegacyLinkNotationConverter.php
#6

Updated by Gerrit Code Review 8 months ago

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

#7

Updated by Gerrit Code Review 8 months ago

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

#8

Updated by Gerrit Code Review 8 months ago

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

#9

Updated by Gerrit Code Review 7 months ago

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

#10

Updated by Sybille Peters 7 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#11

Updated by Benni Mack 6 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF