Issue Bug Under Review Quiet

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

Sybille Peters 05/31/23, 06:20 updated 10/02/26, 11:56

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>

Reproduce

  1. Create a content element (e.g. textmedia) with a link to the following url: t3://page?uid=current#99999999 (add a number of a ce which does not exist)
  2. in Linkvalidator module: Perform link checking
  3. look at the list of broken links: the link should be reported as broken

Versions

  • reproducible with latest main (14.0.0-dev, Apr 6, 2025)
  • 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

Reviews 1

History 630

Show 25 earlier messages
  1. Sybille Peters commented <span data-processor="relativetime" data-value="2024-06-22T06:02:01+00:00" > 06/22/24, 06:02 </span>

    Can still reproduce with latest version “main”.