Project

General

Profile

Actions

Bug #103559

closed

Opening broken link list as non-admin user throws exception if searchFields.sys_file_reference = link is set

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

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2024-04-08
Due date:
% Done:

100%

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

Description

Reproduce

  1. Change TSconfig, e.g. mod.linkvalidator.searchFields.sys_file_reference = link
  2. Switch to a non-admin user
  3. Open the broken link list ("Check links" module) on a page where the above TSconfig is active

An exception will be thrown, see next point:

Exception

(1/1) #1476107295 TYPO3\CMS\Core\Error\Exception
PHP Warning: Undefined array key "uid_local:type" in /var/www/t3coredev13/typo3/sysext/linkvalidator/Classes/QueryRestrictions/EditableRestriction.php line 67

in /var/www/t3coredev13/typo3/sysext/linkvalidator/Classes/QueryRestrictions/EditableRestriction.php line 67

function:

63        $this->allowedLanguages = $this->getAllowedLanguagesForCurrentUser();
64        foreach ($searchFields as $table => $fields) {
65            if ($table !== 'pages' && ($GLOBALS['TCA'][$table]['ctrl']['type'] ?? false)) {
66                $type = $GLOBALS['TCA'][$table]['ctrl']['type'];
67                $fieldConfig = $GLOBALS['TCA'][$table]['columns'][$type]['config'];

Related


Related issues 1 (0 open1 closed)

Blocks TYPO3 Core - Bug #83835: Linkvalidator should check more fields by default, such as sys_file_reference.linkClosed2018-02-09

Actions
Actions #1

Updated by Sybille Peters 8 months ago

  • Blocks Bug #83835: Linkvalidator should check more fields by default, such as sys_file_reference.link added
Actions #2

Updated by Gerrit Code Review 8 months ago

  • Status changed from New to Under Review

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

Actions #3

Updated by Sybille Peters 8 months ago

  • Status changed from Under Review to New

Is also explained in documentation for TCA | ctrl | type:

It is also possible to make the type depend on the value of a related record, for example to switch using the type field of a foreign table. The syntax is relation_field:foreign_type_field. For example the sys_file_metadata table takes its type from the sys_file table.

https://docs.typo3.org/m/typo3/reference-tca/main/en-us/Ctrl/Properties/Type.html#type

See also: https://docs.typo3.org/m/typo3/reference-tca/main/en-us/Ctrl/Properties/Type.html#type-in-relation-to-a-foreign-table-s-field

Actions #4

Updated by Gerrit Code Review 8 months ago

  • Status changed from New to Under Review

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

Actions #5

Updated by Gerrit Code Review 5 months ago

Patch set 3 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/+/83698

Actions #6

Updated by Gerrit Code Review 5 months ago

Patch set 1 for branch 12.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/+/84828

Actions #7

Updated by Gerrit Code Review 5 months ago

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

Actions #8

Updated by Gerrit Code Review 5 months ago

Patch set 2 for branch 12.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/+/84828

Actions #9

Updated by Gerrit Code Review 5 months ago

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

Actions #10

Updated by Sybille Peters 5 months ago

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

Updated by Benni Mack 5 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF