Feature #89182

Epic #85006: Reduce falsely reported broken links

Linkvalidator should only check relevant fields in table

Added by Sybille Peters 7 months ago. Updated 5 months ago.

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

0%

PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Some checks should only be performed if content is relevant.

For example:

tt_content.bodytext : depends on ctype (e.g. is usually not relevant for plugins)
pages.url : depends on doktype

The problem is currently, if page or content element type is change, 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.

h2 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
  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

Possible ideas:

  • automatic (preferred): Handle this in a restriction_builder per table.field. We can get the information, which fields are editable for a content element via TCA: 'interface' => 'showRecordFieldList'. If the editor can edit the field (permissions) is already checked in #84214
  • configure: Add restrictions to the query via TSconfig

Automatic (TCA)

Examples: tt_content

  • Get content type from tt_content.ctype
  • bootstrap_package accordion_item has 'interface' => 'showRecordFieldsList': .. bodytext so we should check that.

Examples: pages

  • canonical_link
  • url (depends on doktype)
  • tt_content.bodytext: depends on ctype (should not be 'header', '

Configure TSconfig

mod.linkvalidator {

# this is already existing TSconfig which defineds the table / field combinations
searchFields = {

  pages = media,url
}

# this could be additional restrictions for the fields
searchRestrictions = {

  pages.url {
    ...
  }
}

Related issues

Related to TYPO3 Core - Feature #89177: Change TsConfig Defaults of Linkvalidator and Enable all core fields containing links New 2019-09-15
Related to TYPO3 Core - Bug #84214: Linkvalidator should not check records without write permissions Closed 2018-03-12

History

#1 Updated by Sybille Peters 7 months ago

  • Related to Feature #89177: Change TsConfig Defaults of Linkvalidator and Enable all core fields containing links added

#2 Updated by Georg Ringer 7 months ago

  • Description updated (diff)

#3 Updated by Sybille Peters 5 months ago

  • Description updated (diff)

#4 Updated by Sybille Peters 5 months ago

  • Related to Bug #84214: Linkvalidator should not check records without write permissions added

#5 Updated by Sybille Peters 5 months ago

  • Subject changed from Extend TSconfig configuration to allow restrictions (where) for fields to Linkvalidator should only check relevant fields in table

#6 Updated by Sybille Peters 5 months ago

  • Parent task set to #85006

Also available in: Atom PDF