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 over 4 years ago. Updated about 19 hours 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.

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

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

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


Related issues 3 (2 open1 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
Actions #1

Updated by Sybille Peters over 4 years ago

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

Updated by Georg Ringer over 4 years ago

  • Description updated (diff)
Actions #3

Updated by Sybille Peters over 4 years ago

  • Description updated (diff)
Actions #4

Updated by Sybille Peters over 4 years ago

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

Updated by Sybille Peters over 4 years ago

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

Updated by Sybille Peters over 4 years ago

  • Parent task set to #85006
Actions #7

Updated by Sybille Peters over 3 years ago

  • Tracker changed from Feature to Bug
  • Description updated (diff)
  • TYPO3 Version set to 9
Actions #8

Updated by Sybille Peters over 3 years ago

  • Description updated (diff)
Actions #9

Updated by Sybille Peters over 3 years ago

  • Related to Feature #92542: Linkvalidator should check shortcut pages added
Actions #10

Updated by Gerrit Code Review over 3 years ago

  • Status changed from New to Under Review

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/66651

Actions #11

Updated by Gerrit Code Review over 3 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/66651

Actions #12

Updated by Gerrit Code Review over 3 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/66651

Actions #13

Updated by Gerrit Code Review over 3 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/66651

Actions #14

Updated by Gerrit Code Review over 3 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/66651

Actions #15

Updated by Gerrit Code Review over 3 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/66651

Actions #16

Updated by Gerrit Code Review over 3 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/66651

Actions #17

Updated by Gerrit Code Review over 3 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/66651

Actions #18

Updated by Gerrit Code Review over 3 years ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/66651

Actions #19

Updated by Gerrit Code Review over 2 years ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/66651

Actions #20

Updated by Gerrit Code Review over 2 years ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/66651

Actions #21

Updated by Gerrit Code Review over 2 years ago

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/66651

Actions #22

Updated by Gerrit Code Review over 2 years ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/66651

Actions #23

Updated by Gerrit Code Review over 2 years ago

Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/66651

Actions #24

Updated by Gerrit Code Review over 2 years ago

Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/66651

Actions #25

Updated by Gerrit Code Review over 2 years ago

Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/66651

Actions #26

Updated by Gerrit Code Review over 2 years ago

Patch set 19 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/66651

Actions #27

Updated by Gerrit Code Review over 2 years ago

Patch set 20 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/66651

Actions #28

Updated by Gerrit Code Review over 2 years ago

Patch set 21 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/66651

Actions #29

Updated by Gerrit Code Review over 2 years ago

Patch set 22 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/+/66651

Actions #30

Updated by Sybille Peters about 19 hours ago

Update:

It is currently not possible to use the FormDataGroup TcaDatabaseRecord in order to get a list of fields which will be displayed in the BE.

Linkvalidator should get the visible fields in the BE so that only these will be checked (and not for example the "bodytext" field for a CE type "header", where links exist in bodytext but the type was changed).

In order to determine the visible fields for a form in the BE, one can theoretically use FormEngine data processing, e.g.

$formDataGroup = GeneralUtility::makeInstance(TcaDatabaseRecord::class);
$this->formDataCompiler = GeneralUtility::makeInstance(FormDataCompiler::class, $formDataGroup);
$formDataCompilerInput = [
    'tableName' => $tablename,
    'vanillaUid' => $uid,
    'command' => 'edit',
    'request' => $request;
];
$processedFormData = $this->formDataCompiler->compile($formDataCompilerInput);
$fields = $processedFormData['processedTca']['columns'];

This almost works, but we have a problem: For example if CType="header", the returned fields contain "bodytext" because this is set in TcaColumnsProcessRecordTitle. Problably, there are other cases where some fields are added to columnsToProcess and processedTca/columns which should not be displayed in the BE form.

The relevant classes are:

- TcaColumnsProcessShowitem: where the fields are added to $result['columnsToProcess']
- TcaColumnsRemoveUnused: where the fields NOT in 'columnsToProcess' are removed from $result['processedTca']['columns']

The problem here is that there is not a clear distinction between columnsToProcess and the columns to show.

I am hoping there might be a possibility to provide this functionality for extension authors (also for other use cases) in order to slightly modify the core or provide a method which I have overlooked.

Actions

Also available in: Atom PDF