Project

General

Profile

Actions

Bug #83308

closed

Allowed memory size exhausted when editing file meta data

Added by Markus Poerschke over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2017-12-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #78845: Editing a sys_file_metadata record (eg. through filelist) fetches all sys_file recordsClosed2016-11-30

Actions
Actions #1

Updated by Susanne Moog over 6 years ago

  • Category set to FormEngine aka TCEforms
Actions #2

Updated by Gerrit Code Review over 6 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

Actions #3

Updated by Stephan Großberndt over 6 years ago

  • Status changed from Under Review to Closed
Actions #4

Updated by Stephan Großberndt over 6 years ago

  • Is duplicate of Bug #78845: Editing a sys_file_metadata record (eg. through filelist) fetches all sys_file records added
Actions

Also available in: Atom PDF