Review main Merged

61970[BUGFIX] Disable translation for TCA field file of sys_file_metadata

Tizian Schmidlin CR +2 V +2 Easy +4 −1 updated 04/20/20, 09:01

Commit message

There is a flaw in the way TYPO3 handle the rendering of the backend edit
forms that leads to fields used as labels always being rendered. This may
lead to an huge amount of html being generated and thrown away without
ever being pushed to the browser.

For most fields, this effort is negligible, since TYPO3 has to render
i.e. the title field once per backend call anyway. For table using a
relation as title, as does `sys_file_metadata`, this means generating
a select with all files in the system that could be related to that
record.

What happens is, that since the label of the sys_file_metadata record is
the field file, the FormDataProvider `TcaColumnsProcessRecordTitle` will
add file to the columnsToProcess for the current record and the
`TcaSelectItems`  will happily work it's way through and generate the
html for the select box. Bare in mind, that this is absolute and utter
dead weight since nowhere in the TCA showItem definition of any type the
file field is referenced. This would not be to big of a problem since
in most systems there are no more than 10k files but in systems with
100'000+ the memory get's used up and it can lead to memory exhausted
errors in PHP (even with as much as 512M memory_limit).

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 1