Project

General

Profile

Actions

Bug #100933

open

Checking internal links to current page with missing anchor is not reported as broken link

Added by Sybille Peters 12 months ago. Updated 9 months ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Linkvalidator
Target version:
-
Start date:
2023-05-31
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
13
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
On Location Sprint

Description

This is reported as broken link (assuming CE #999999999 does not exist on page 27):

<p><a href="t3://page?uid=27#999999999">link to another page with missing anchor</a></p>

This is not reported as broken link (assuming CE #999999999 does not exist on current page):

<p><a href="t3://page?uid=current#99999999">link to current page with missing anchor</a></p>

Versions

  • main
  • 11.5 (latest)

More context

Another issue has been created for the more general problem in the softref parser: #100934

This seems to be due to TypolinkTagSoftReferenceParser::parse not considering links with the format t3://page?uid=current#99999999. This function is called in linkvalidator. The parser does not return the t3://page?uid=current links.

So it looks like not an error in linkvalidator, but an error in the link parser.

code:

} elseif ($linkDetails['type'] === LinkService::TYPE_PAGE && preg_match('/page\?uid=(\d+)#?(\d+)?/', $matches[1], $pageAndAnchorMatches)) {

https://github.com/TYPO3/typo3/blob/main/typo3/sysext/core/Classes/DataHandling/SoftReference/TypolinkSoftReferenceParser.php


Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Bug #100934: Typolink soft reference parsers does not consider links to currrent pageUnder Review2023-05-31

Actions
Actions

Also available in: Atom PDF