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
Updated by Gerrit Code Review 11 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
Updated by Gerrit Code Review 11 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
Updated by Gerrit Code Review 10 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
Updated by Torben Hansen 10 days ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 5143487f19c8719a76dfbf553a99ab4373a1c2f7.