Bug #103721
closedPHP 8 undefined array key warnings in SuggestWizardController
100%
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