Project

General

Profile

Actions

Bug #94381

closed

Editors dont see broken links because of invalid use of coalesce operator in LinkAnalyzer

Added by Stefan Berger almost 3 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Linkvalidator
Target version:
-
Start date:
2021-06-18
Due date:
% Done:

100%

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

Description

Hi,

We have noticed that editors don't see broken links in the backend because the display of these links through the
TYPO3\CMS\Linkvalidator\QueryRestrictions\EditableRestriction is excluded.

In our case the link entries in the database in the column `element_type` the table `tx_linkvalidator_link` has no value.

This field is actually filled in the method checklinks of the class TYPO3\CMS\Linkvalidator\LinkAnalyzer .

However, the following condition is defined:
if ($entryValue['row'][$typeField] ?? false) {
$record['element_type'] = $entryValue['row'][$typeField];
}

The problem is now, if the type value is 0, this value is never written in the field. This condition would have to be corrected or removed.

Actions #1

Updated by Emanuel Wyss over 2 years ago

I am working on a page with the news extension. There the bug affects the links in news posts, because the news type is 0 by default. So non admin backend users don't see the broken links in the module.

Actions #2

Updated by Sybille Peters over 2 years ago

So you are saying, the broken links will not be displayed for non-admin users if tx_linkvalidator_links.element_type is empty?

I can reproduce this, e.g. by checking broken links in news records and then viewing the broken links as admin and non-admin user.

However, it is correct that element_type is empty so I don't think the problem is in the LinkAnalyzer class. The problem is that the EditableRestriction should not check if element_type is one of the allowed types if the element_type is empty. So, I think the EditableRestriction should be fixed instead.

Setting element_type should get fixed as well as making sure the type is used with authMode.

Actions #3

Updated by Sybille Peters over 2 years ago

  • Status changed from New to In Progress
Actions #4

Updated by Gerrit Code Review over 2 years ago

  • Status changed from In Progress to Under Review

Patch set 1 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/+/71419

Actions #5

Updated by Gerrit Code Review over 2 years ago

Patch set 2 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/+/71419

Actions #6

Updated by Gerrit Code Review over 2 years ago

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

Actions #7

Updated by Sybille Peters over 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #8

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF