Project

General

Profile

Actions

Bug #103721

closed

PHP 8 undefined array key warnings in SuggestWizardController

Added by Tobias Pfender 7 months ago. Updated 5 months ago.

Status:
Closed
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

Also available in: Atom PDF