Review main Merged

25456[BUGFIX] Can not delete Files with metadata records

Frans Saris CR +2 V +2 Easy +6 −3 updated 11/21/13, 16:01

Commit message

When a sys_file record has relation with a sys_file_metadata
record the file can not be deleted.

This patch excludes tables sys_file_metadata from the
reference check.

Review

  • Code review CR +2
    • Markus Klein +2
    • Alexander Opitz +1
    • Fabien Udriot +1
  • Verified V +2
    • Markus Klein +2
    • Alexander Opitz +1

Issues 1

Files 2

Review log 15

  1. Mr. Jenkins commented on patch set 1 11/16/13, 09:54

  2. Steffen Ritter voted on patch set 1 CR +1 11/16/13, 12:35

  3. Frans Saris commented on patch set 1 11/16/13, 12:53

    Maybe we should make the list of tables to ignore configurable, or should turn the check arround and check only for sys_file_reference (but then we do not have to use sys_refindex but have only to check sys_file_reference). For instance when you add tagging to sys_file. Think making it configurable is the best option.
  4. Frans Saris commented on patch set 1 11/16/13, 16:00

    After rethinking this categories are now linked to the metadata record. Same for new relations you would create/add (the tags example). @Steffen, does it make sense to exclude sys_category as in current master these are linked to sys_file_metadata?
  5. Frans Saris commented on patch set 1 11/21/13, 08:52

    See http://forge.typo3.org/issues/53672#note-5 for testing instructions
  6. Tomita Militaru commented on patch set 1 V +1 CR +1 11/21/13, 09:28

    Works for me.
  7. Benni Mack commented on patch set 1 11/21/13, 14:13

    Seems like a hack for me, I think that deleting a record should remove its references automatically, because the delete information is cascading to the loose references (similar to IRRE). E.g. File metadata should be deleted as well - with this patch we just don't care about this reference, and this ends in a bad reference index. The reference to a category is loose (IMHO) and thus, should just be removed automatically. The reference to tt_content->image f.e. is critical, so this should be prohibited (which it currently does already). These are the three types I see currently.
  8. Frans Saris uploaded patch set 2 11/21/13, 15:19

  9. Mr. Jenkins commented on patch set 2 11/21/13, 15:36

  10. Alexander Opitz voted on patch set 2 CR +1 11/21/13, 15:40

  11. Alexander Opitz voted on patch set 2 V +1 11/21/13, 15:55

  12. Fabien Udriot voted on patch set 2 CR +1 11/21/13, 15:58

  13. Markus Klein commented on patch set 2 CR +1 11/21/13, 16:00

    Testing instructions: * Upload file in Filelist via d&d for instance * Edit it once and save+close it. (no need to change anything, just to create the refindex) * try to delete the file
  14. Markus Klein voted on patch set 2 V +2 CR +2 11/21/13, 16:01

  15. Markus Klein merged patch set 3 11/21/13, 16:01