Bug #104233
closedPHP Warning: Undefined array key "minitems" for editors with no permissions to sys_file_reference
100%
Description
Setting up an editor to allow tt_content but not sys_file_references leads to a strange error
PHP Warning: Undefined array key "minitems" in /var/www/html/typo3/sysext/backend/Classes/Form/Container/FilesControlContainer.php line 169
Problematic code
$this->fileReferenceData['config'][$formFieldIdentifier . '-' . self::FILE_REFERENCE_TABLE] = [ 'min' => $config['minitems'], 'max' => $config['maxitems'], 'sortable' => $config['appearance']['useSortable'] ?? false, 'top' => [ 'table' => $top['table'], 'uid' => $top['uid'], ], 'context' => [ 'config' => $configJson, 'hmac' => $this->hashService->hmac($configJson, 'FilesContext'), ], ];
The reason is simple: \TYPO3\CMS\Backend\Form\FormDataProvider\TcaFiles
does early checks if the user doesn't have access and if not, no default min/max items are initialized
Updated by Gerrit Code Review 5 months ago
- Status changed from Accepted 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/+/84944
Updated by Gerrit Code Review 5 months ago
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/+/84944
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/+/84944
Updated by Gerrit Code Review 2 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/+/86219
Updated by Georg Ringer 2 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 6327d33693bd86430e56a369b3427dd8a085b0a5.