Project

General

Profile

Actions

Bug #103691

open

Rechecking links after edit in linkvalidator will always result in link being removed because of wrong linktypes

Added by Sybille Peters 7 months ago. Updated about 1 month ago.

Status:
Under Review
Priority:
Must have
Category:
Linkvalidator
Target version:
-
Start date:
2024-04-21
Due date:
% Done:

0%

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

Description

Reproduce

1. On pages with broken links, run "Check links" in the linkvalidator module
2. Jump to "Report" and click "edit" action button for one of the links
3. Change the link - but make sure it is still broken
4. Save and close

The broken links should now still be in the list of broken links, but it is removed

Analyze

The reason that this happens is that wrong linktypes array is passed to the function LinkAnalyzer::checkLinks.

In function checkLinks, compare value of second parameter $linkTypes.

1. On full check:

LinkvalidatorController calls LinkAnalyzer::getLinkStatistics()

with first parameter $linkTypes (which is a modified list of $this->checkOpt['check'] where the link type is the value, not the array

LinkAnalyzer::checkLinks is called with second parameter $linkTypes:

[
  0 => 'external'
  1 => 'file'
  2 => 'db'
]

2. On recheck

LinkvalidatorController calls LinkAnalyzer::recheckLinks()

with first parameter $this->checkOpt['check']

[
  'external' => 1
  'file' => 1
  'db' => 1
]

Versions

  • v11
  • v12
  • v13
Actions #1

Updated by Sybille Peters 7 months ago

  • Description updated (diff)
Actions #2

Updated by Gerrit Code Review 7 months ago

  • Status changed from New to Under Review

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/+/83613

Actions #3

Updated by Sybille Peters 7 months ago

  • Priority changed from Should have to Must have
Actions #4

Updated by Gerrit Code Review about 1 month ago

Patch set 8 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/+/83613

Actions

Also available in: Atom PDF