Project

General

Profile

Actions

Bug #78845

closed

Story #69712: Further FormEngine development

Editing a sys_file_metadata record (eg. through filelist) fetches all sys_file records

Added by Sascha Nowak almost 8 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2016-11-30
Due date:
% Done:

100%

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

Description

After some discussion on Slack with lolli, he wrote the following:

Analysis:
  • field "file" in "sys_file_metadata" is configured as select field to sys_file. it is used as: the "inline" counterpart field of field "sys_file" "metadata" since the fields holds the uid of the sys_file record, this sys_file_metadata is for.
  • during opening a sys_file_metadata record (eg. through filelist), the TcaSelectItems data provider fetches all "possible" select targets (which basically means "all" sys_file records) with one single query. this can become "a lot" - 10MB for 10k records
  • the fun part is, the file field itself is never displayed (not rendered), since it is a) set to readonly, b) shut down per display condition for sys_language_uid!=0, c) it is in NO showitem configuration
  • however, it is important to submit the current field value to the data handler, since otherwise the relation to sys_file would get lost upon editing a sys_file_metadata record
Possible solutions:
  • it "may" indeed be possible to switch the field to a group field to suppress fetching these records all the time
Questions / Scenarios:
  • we need to verify that the inline "from sys_file to sys_file_metadata" direction still works if the counter side is switched from select to group
  • we still should mark the field "readOnly" for group, is that possible?
  • does the "placeholder" / "override" stuff still work if switched group, for instance in tt_content->sys_file->sys_file_metadata ? it is very well possible warnings are raised here since the internal select and group data handling is slightly different (select=array, group=comma mess) ... i remember the placeholder logic is also funny and recursive and this needs an additional check then.
  • currently, if doing tt_content editings ... i "think" the calculation of that "sys_file_metadata" "file" field item calculation is probably suppressed already somehow (we had massive performance issues in fal with new FormEngine, and I somehow solved that by suppressing some calculation - question is "how"?). this should have a detailed look again.
  • does stuff like the fal indexer and uploader work successfully with group and fills / updates metadata correctly and sets correct relations? (edited)
Another possible solution I could think about is
  • Ignore fetching records in the TcaSelectItems for readOnly fields (which may not work if the field is used in relations)

Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #83308: Allowed memory size exhausted when editing file meta dataClosed2017-12-13

Actions
Actions

Also available in: Atom PDF