Project

General

Profile

Actions

Bug #89182

open

Epic #85006: Reduce falsely reported broken links

Linkvalidator should only check relevant fields in table

Added by Sybille Peters almost 5 years ago. Updated 10 days ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Linkvalidator
Target version:
-
Start date:
2019-09-16
Due date:
% Done:

0%

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

Description

Some checks should only be performed if content is relevant. Additionally, the type ($GLOBALS['TCA'][$table]['columns'][$field]['config']['type']) / softref configuration may change due to columnsOverrides

Currently, no TCA processing is performed, so this is not taken into account.

The problem is currently, if page or content element types are changed, the content is not removed from the fields which are now no longer relevant, so in older sites where this had been changed, you may get a lot of "broken links" for content that is not rendered in FE and is irrelevant.

Long term we would also like to be able to check flexform fields, so this should be considered as well.

Examples

  • type * tt_content.bodytext : depends on ctype (e.g. is usually not relevant for plugins or header) * pages.url : depends on doktype
  • displayCond * whether field is displayed in BE or not can depend on several conditions
  • overrideChildTca ?

why is this a problem

  • broken links in fields which are not relevant are checked (e.g. due to type, displayCond, etc.)
  • broken links are displayed in list, but editor gets error message or blank page when clicking pencil
  • which softref parsers are used depends on the type of the field. One field may have different types depending on context (e.g. type of record)

Reproduce

  1. Create a content element, e.g. "text & media"
  2. Add a broken link to the content (tt_content.bodytext)
  3. Now change the content type, e.g. to plugin or header
  4. We recheck for broken links for that page
  5. We look at linkvalidator report

Actual result: The broken link will be displayed

Expected result: The broken link in the element "plugin" should not be displayed, because tt_content.bodytext is not relevant if content type is plugin

Possible solution

It should be possible to get the information, which fields are editable via TCA: 'interface' => 'showRecordFieldList'.

Additionally, the type should be evaluated (e.g. tt_content.CType, pages.doktype, based on $GLOBALS['TCA'][$table]['ctrl']['type'].

How to handle this, e.g.

  1. do TCA processing in Link Validator
  2. alternative: have "cleanup" script which removes irrelevant content (e.g. as in lowlevel cleaner Flexform cleanup). However, columnsOverrides should still be performed to get the correct type.

Related issues 5 (3 open2 closed)

Related to TYPO3 Core - Feature #89177: Change TsConfig Defaults of Linkvalidator and Enable all core fields containing linksNew2019-09-15

Actions
Related to TYPO3 Core - Bug #84214: Linkvalidator should not check records without write permissionsClosedSybille Peters2018-03-12

Actions
Related to TYPO3 Core - Feature #92542: Linkvalidator should check shortcut pagesNew2020-10-12

Actions
Related to TYPO3 Core - Task #103477: Documentation for Link Validator searchFields says it is only possible to check fields with a defined "softref"ResolvedSybille Peters2024-03-25

Actions
Related to TYPO3 Core - Bug #103478: Linkvalidator should check fields with type "file"New2024-03-25

Actions
Actions

Also available in: Atom PDF