Review main Merged

16239[BUGFIX] deleteRecord_flexFormCallBack deletes file_references

Lorenz Ulrich CR +2 V +2 Easy +2 −2 updated 12/31/14, 10:47

Commit message

Files that are referenced in a flexform
<type>group</type><internal_type>file_reference</internal_type>
will be deleted by deleteRecord_flexFormCallBack() in
t3lib_TCEmain, independent of the path or usage by other records.

For normal record fields (e.g. tt_content.images), only file
with the internal_type "file" are deleted. Files of
internal_type "file_reference" are respected and will not be
deleted. There is an appropriate condition in
t3lib_TCEmain::extFileFunctions().

But for flexform fields, this differentiation in handling
between both internal_types is missing.

Therefore using lowlevel_cleaner or the delete option in the
recycler will delete files that may be still in use. The
flexFormCallBack must be changed to delete only files of
internal_type "file".

Review

  • Code review CR +2
    • Benni Mack +2
    • Markus Klein +1
    • Anja Leichsenring +1
    • Stefan Froemken +1
  • Verified V +2
    • Benni Mack +2
    • Anja Leichsenring +1

Files 1

Review log 42

Show 17 earlier messages
  1. Oliver Hader commented on patch set 1 05/27/13, 17:19

    The fix looks good by reading, however I'd like to test that carefully... Besides that, restoring files from history service (revert) won't currently work, correct?
  2. Lorenz Ulrich commented on patch set 1 05/27/13, 17:19

    You are right. A deleted file cannot be restored. This is the same for method "extFileFunctions" that is used for the TCEform equivalent. I guess this was introduced when the recycler didn't exist yet. Maybe it would make sense to harmonize the behaviour between TCEform and FlexForm with this changeset (and therefore merge this one) and add the "safe delete" stuff in another changeset.
  3. Tobias Liebig commented on patch set 2 05/27/13, 17:19

    Looks good to me, but someone else must approve Looks fine from reading. I think the "safe delete" thing Oli mentioned is another issue/topic.
  4. Lorenz Ulrich uploaded patch set 2 05/27/13, 17:19

  5. Lorenz Ulrich uploaded patch set 3 05/27/13, 17:19

  6. Tobias Liebig commented on patch set 4 05/27/13, 17:19

    Looks good to me, but someone else must approve
  7. Lorenz Ulrich uploaded patch set 4 05/27/13, 17:19

  8. Lorenz Ulrich commented on patch set 4 05/27/13, 17:19

    Trying to resolve some nasty dependencies between my changesets. No functional changes.
  9. Mattias Nilsson commented on patch set 1 05/27/13, 17:19

    Looks good to me, but someone else must approve
  10. Mr. Jenkins commented on patch set 1 05/27/13, 17:19

  11. Mr. Jenkins commented on patch set 2 05/27/13, 17:19

  12. Mr. Jenkins commented on patch set 3 05/27/13, 17:19

  13. Mr. Jenkins commented on patch set 4 05/27/13, 17:19

  14. Wouter Wolters uploaded patch set 5 05/28/13, 19:27

  15. Mr. Jenkins commented on patch set 5 05/28/13, 19:28

  16. Lorenz Ulrich voted on patch set 5 V +1 CR +1 09/12/13, 10:38

  17. Markus Klein rebased onto patch set 5 01/03/14, 17:03

  1. Markus Klein commented on patch set 6 01/03/14, 17:03

    Is this really targeted to all versions?
  2. Mr. Jenkins commented on patch set 6 01/03/14, 17:17

  3. Lorenz Ulrich commented on patch set 6 01/03/14, 17:55

    Well, the releases info has to do with the long history of this change. The bug is present in all the versions mentioned, but I'm not sure which versions are still getting bugfixes ATM. Do you know it?
  4. Markus Klein commented on patch set 6 01/03/14, 18:41

    The question was meant for the release managers listed here. 4.x needs RM clearance.
  5. Lorenz Ulrich updated the commit message in patch set 6 03/06/14, 07:10

  6. Lorenz Ulrich commented on patch set 7 03/06/14, 07:11

    I removed the 4.x versions from the Releases after having read Xavier's post about fixes in old versions.
  7. Mr. Jenkins commented on patch set 7 03/06/14, 07:23

  8. Markus Klein voted on patch set 7 CR +1 03/06/14, 14:52

  9. Markus Klein wrote 03/18/14, 10:00

    Topic updated from "40052" to "DataHandler".
  10. Markus Klein commented on patch set 7 CR 0 03/26/14, 22:40

    DataHandler.php:4342

    ===
  11. Markus Klein uploaded patch set 8 07/06/14, 22:58

  12. Markus Klein updated the commit message in patch set 8 07/06/14, 22:58

  13. Markus Klein voted on patch set 9 CR +1 07/06/14, 22:59

  14. Mr. Jenkins commented on patch set 8 07/06/14, 23:19

  15. Mr. Jenkins commented on patch set 9 07/06/14, 23:29

  16. Marcin Sągol voted on patch set 9 CR +1 07/07/14, 21:54

  17. Benni Mack updated the commit message in patch set 10 11/24/14, 18:26

  18. Benni Mack voted on patch set 10 CR +1 11/24/14, 18:26

  19. Stefan Froemken voted on patch set 10 CR +1 11/25/14, 20:53

  20. Anja Leichsenring voted on patch set 10 CR +1 V +1 12/13/14, 14:18

  21. Markus Klein commented on patch set 10 CR +1 12/13/14, 23:55

    How to test that?
  22. Lorenz Ulrich commented on patch set 10 12/14/14, 13:32

    You need a FlexForm with a non-FAL File Picker of internal_type "file_reference". Then you reference a file with that file picker. Then you delete the CE containing this FlexForm. The file will be physically deleted.
  23. Benni Mack commented on patch set 10 CR +2 V +2 12/31/14, 10:47

    works as expected. Only happens if you have records without a deleted-field (so I had to disable it for tt_content and tried it with flexform_media). Also tested it with files and file reference. FYI: When using file references, it delivers a sys_file info, not the full path so the deletion did not work on master but an ugly message appeared.
  24. Benni Mack merged patch set 10 12/31/14, 10:47

  25. Benni Mack commented on patch set 11 12/31/14, 10:47

    Cherry Picked This patchset was cherry picked to branch TYPO3_6-2 as commit b33c62bcb9d8f5867a4be224d80bf16d8f096453