Project

General

Profile

Actions

Bug #103721

closed

PHP 8 undefined array key warnings in SuggestWizardController

Added by Tobias Pfender 12 days ago. Updated 8 days ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2024-04-25
Due date:
% Done:

100%

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

Description

Issue:
Using the Suggest-Wizard as a non-admin user can cause warnings in PHP 8+ & latest TYPO3 11, TYPO3 12 and TYPO3 13.1:

Core: Error handler (BE): PHP Warning: Undefined array key "adminOnly" in /var/www/html/public/typo3/sysext/backend/Classes/Controller/Wizard/SuggestWizardController.php line 215
Core: Error handler (BE): PHP Warning: Undefined array key "rootLevel" in /var/www/html/public/typo3/sysext/backend/Classes/Controller/Wizard/SuggestWizardController.php line 220
(In TYPO3 13.1 it's line 214 and line 219)

Steps to reproduce the issue:
- create empty TYPO3 System
- create a rootpage and a sysfolder inside
- create editor user group and user
- give user access to pages and sys_category
- simulate or login into editor
- edit sys_category and type something into the suggest wizard of elements
- the log should now be flooded with warnings

It seems like, a lot of tables in tca do not have the properties ['ctrl']['rootlevel'] && ['ctrl']['adminOnly'], 'pages' for example. So the Suggest-Wizard checks for non-admin user all tables it tries to look up. So every suggestion requests logs two warnings for every table it checks.

In TYPO3 13

Actions #1

Updated by Torben Hansen 10 days ago

  • Status changed from New to Accepted
Actions #2

Updated by Gerrit Code Review 9 days ago

  • Status changed from Accepted 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/+/84074

Actions #3

Updated by Gerrit Code Review 9 days 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/+/84074

Actions #4

Updated by Gerrit Code Review 8 days 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/+/84057

Actions #5

Updated by Torben Hansen 8 days ago

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

Also available in: Atom PDF