Review main Merged

87004[BUGFIX] Handle links to CE correctly in Linkvalidator

Sybille Peters CR +2 V +2 Normal +115 −1 updated 09/23/26, 16:13

Commit message

Typolinks pointing to a content element anchor of a page, of the
format t3://page?uid=1#2, were not parsed correctly for TCA fields
of type "link" (e.g. tt_content.header_link), unlike for fields
using the "typolink_tag" soft reference parser (e.g. bodytext).

The "typolink" soft reference parser returns two matches for such
a link: one for the page and one for the content element.
LinkAnalyzer::analyzeTypoLinks() (used for typolink_tag results)
already merges these into a single "pageAndAnchor" entry, but
analyzeLinks() (used for all other soft reference parsers) does
not, which made the report show the content element uid as if it
were the linked page.

Fields of TCA type "link" contain the typolink value directly and
do not need to go through the generic soft reference dispatch at
all. LinkAnalyzer::analyzeRecord() now detects them by their
TableColumnType::LINK type and hands them to a dedicated
analyzeTypolink() method, which reuses the "typolink" soft
reference parser directly and performs the same page/content
element merge as analyzeTypoLinks().

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Wouter Wolters +1
  • Verified V +2 Done
    • Benni Mack +2
    • Wouter Wolters +1
    • core-ci +1 CI

Issues 1

Files 4

Review log 1418

  1. Sybille Peters uploaded patch set 1 11/16/24, 15:59

  2. Sybille Peters wrote 11/16/24, 16:02

    Topic set to Linkvalidator
  3. core-ci voted on patch set 1 V +1 11/16/24, 16:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69529

  4. Benni Mack commented on patch set 1 12/11/24, 15:11

    LinkAnalyzer.php:441

    isn't LinkService here the best solution to resolve this?
  5. Benni Mack wrote 04/21/26, 14:56

    Removed cc Benni Mack.
  6. Benni Mack marked it work in progress 04/21/26, 14:56

  7. Benni Mack uploaded patch set 2 V +1 09/23/26, 14:49

  8. Benni Mack commented on patch set 2 09/23/26, 14:52

    LinkAnalyzer.php:441 Reply

    Done
  9. core-ci voted on patch set 2 V +1 09/23/26, 15:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109061

  10. Benni Mack uploaded patch set 3 V +1 09/23/26, 15:16

  11. Benni Mack updated the commit message in patch set 4 09/23/26, 15:16

  12. Benni Mack marked it ready for review 09/23/26, 15:16

  13. Benni Mack voted on patch set 4 CR +1 V +1 09/23/26, 15:17

  14. core-ci voted on patch set 3 V +1 09/23/26, 15:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109063

  15. core-ci voted on patch set 4 V +1 09/23/26, 15:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109064

  16. Wouter Wolters voted on patch set 4 CR +1 V +1 09/23/26, 16:08

  17. Benni Mack voted on patch set 4 CR +2 V +2 09/23/26, 16:13

  18. Benni Mack merged patch set 5 09/23/26, 16:13