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 Done
    • Daniel Goerz +2
    • Susi Moog +1
    • Benni Mack +1
  • Verified V +2 Done
    • Daniel Goerz +2
    • Susi Moog +1
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 2130

Show 35 earlier messages
  1. Tizian Schmidlin uploaded patch set 1 10/14/19, 11:49

  2. TYPO3com voted on patch set 1 V -1 10/14/19, 11:50 Completed build in 11s on Mon, 14 Oct, 11:50 AM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37304

  3. Andreas Kienast commented on patch set 1 10/14/19, 13:17

    Since this is a feature, this can't go into 9.5.
  4. Tizian Schmidlin updated the commit message in patch set 2 10/14/19, 13:23

  5. TYPO3com voted on patch set 2 V -1 10/14/19, 13:23 Completed build in 11s on Mon, 14 Oct, 01:23 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37307

  1. Tizian Schmidlin commented on patch set 2 V +1 CR +1 10/14/19, 13:23

    > Patch Set 1: > > (1 comment) Yes, of course! I did not catch that from the default template.
  2. Tizian Schmidlin updated the commit message in patch set 3 10/14/19, 13:34

  3. TYPO3com voted on patch set 3 V -1 10/14/19, 13:35 Completed build in 11s on Mon, 14 Oct, 01:35 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37309

  4. Tizian Schmidlin updated the commit message in patch set 4 10/14/19, 13:35

  5. TYPO3com voted on patch set 4 V -1 10/14/19, 13:35 Completed build in 11s on Mon, 14 Oct, 01:35 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37310

  6. Tizian Schmidlin uploaded patch set 5 10/14/19, 13:44

  7. TYPO3com commented on patch set 5 10/14/19, 13:50 Completed build in 31s on Mon, 14 Oct, 01:50 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37312

  8. Tizian Schmidlin uploaded patch set 6 10/14/19, 13:59

  9. TYPO3com voted on patch set 6 V -1 10/14/19, 14:09 Completed build in 09m 39s on Mon, 14 Oct, 02:09 PM Test Summary: 47694 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37313

  10. Tizian Schmidlin commented on patch set 6 10/14/19, 14:14

    > Patch Set 6: Verified-1 > > Completed build in 09m 39s on Mon, 14 Oct, 02:09 PM > Test Summary: 47694 passed > Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37313 Does this mean that bamboo has just thrown out my change because it got an issue with PGsql that has nothing to do with the code?

    Reply

    Done
  11. Tizian Schmidlin uploaded patch set 7 10/14/19, 15:35

  12. TYPO3com voted on patch set 7 V +1 10/14/19, 15:55 Completed build in 17m 54s on Mon, 14 Oct, 03:55 PM Test Summary: 47982 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37319

  13. Oliver Klee commented on patch set 7 10/14/19, 16:48

    sys_file_metadata.php:93 Unresolved

    Is there a way we can get rid of the negation? I find it very confusing (and hence error-prone) to "enable the disabling of a feature". (For example, we could have a translate = true default that can be overriden.)
  14. Tizian Schmidlin uploaded patch set 8 10/15/19, 06:35

  15. TYPO3com voted on patch set 8 V +1 10/15/19, 06:58 Completed build in 20m 53s on Tue, 15 Oct, 06:58 AM Test Summary: 47982 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37326

  16. Benni Mack commented on patch set 8 02/15/20, 09:37

    I think we can just explicitly hard-code "sys_file_metadata" in the FormEngine for this use-case instead.
  17. Benni Mack commented on patch set 8 CR -1 02/15/20, 09:45

    I'd go with "hardcoding" and mark it as bugfix for v10 and v9.
  18. Georg Ringer uploaded patch set 9 03/06/20, 23:40

  19. TYPO3com voted on patch set 9 V +1 03/06/20, 23:55 Completed build in 15m 23s on Fri, 6 Mar, 11:55 PM Test Summary: 72093 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1064

  20. Benni Mack voted on patch set 9 CR +1 03/07/20, 18:31

  21. Susi Moog voted on patch set 9 CR +1 03/08/20, 07:18

  22. Susi Moog voted on patch set 9 V +1 03/15/20, 10:31

  23. Daniel Goerz voted on patch set 9 V +2 CR +2 03/15/20, 11:31

  24. Daniel Goerz merged patch set 10 03/15/20, 11:31

  25. Oliver Hader commented on patch set 10 04/20/20, 09:01

    TcaSelectItems.php:104 Unresolved