Bug #83308
closedAllowed memory size exhausted when editing file meta data
0%
Description
We have ca. 220k sys_files
records. When editing the meta data (sys_file_metadata
) we get the following error message:
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/vendor/typo3/cms/typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractItemProvider.php on line 1199
The problem is the file
field in the sys_file_metadata
. All available 220k files are loaded as possible items for that field. But the definition of file
defines it as a "readOnly" field. Therefore only the current selection should be loaded.
I am not sure where exactly this bug needs to be fixed.
For us adding a typo3conf/ext/site_xxx/Configuration/TCA/Overrides/sys_file_metadata.php
file with the following content solved the issue for us:
$GLOBALS['TCA']['sys_file_metadata']['columns']['file']['config']['foreign_table_where'] = 'AND sys_file.uid = ###REC_FIELD_file###';
I think either this should be added to the original TCA configuration or \TYPO3\CMS\Backend\Form\FormDataProvider\TcaSelectItems::addData
needs to be changed in a way that only the current record is loaded when the select field is defined as "readOnly".
We are using TYPO3 v7 LTS. I do not know currently if the bug also exists in newer TYPO3 versions.
Updated by Susanne Moog almost 7 years ago
- Category set to FormEngine aka TCEforms
Updated by Gerrit Code Review almost 7 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55125
Updated by Stephan Großberndt almost 7 years ago
- Status changed from Under Review to Closed
Updated by Stephan Großberndt almost 7 years ago
- Is duplicate of Bug #78845: Editing a sys_file_metadata record (eg. through filelist) fetches all sys_file records added