Review main Merged

55197[BUGFIX] Catch DatabaseRecordException when editing record with deleted relation

Andreas Kienast CR +2 V +2 Easy +33 −3 updated 01/27/18, 11:10

Commit message

Editing a record with a deleted related record leads to an uncaught
DatabaseRecordException. This patch catches the exception and
ignores such records, but logs a warning.

Due to possible errors occurring with certain DBMS (e.g. MySQL
strict) columns may require a default value now in TCA.

Review

  • Code review CR +2
    • Andreas Wolf +2
    • Reiner Teubner +1
  • Verified V +2
    • Andreas Wolf +2
    • Reiner Teubner +1
    • TYPO3com +1 CI

Issues 1

Files 2

Review log 2936

Show 811 earlier messages
  1. Andreas Kienast uploaded patch set 1 12/22/17, 10:35

  2. TYPO3com voted on patch set 1 V +1 12/22/17, 10:41 Completed build in 06m 29s on Fri, 22 Dec, 11:41 AM Test Summary: 29981 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17934

  3. Michael Oehlhof voted on patch set 1 CR +1 12/22/17, 11:48

  4. Stephan Großberndt voted on patch set 1 CR +1 12/22/17, 13:03

  5. Andreas Wolf commented on patch set 1 CR -1 12/22/17, 16:28

    TcaInline.php:158

    Silently swallowing exceptions sounds dangerous to me; we should probably at least log a notice or warning here.
  6. Andreas Kienast commented on patch set 1 12/22/17, 18:15

    TcaInline.php:158 Reply

    I get your point, but after saving the record again the exception will not occurr again. And there's nothing one can do to fix this, besides jumping into the database and fix the record manually.
  7. Andreas Kienast uploaded patch set 2 12/28/17, 07:53

  8. TYPO3com voted on patch set 2 V +1 12/28/17, 08:01 Completed build in 08m 37s on Thu, 28 Dec, 09:01 AM Test Summary: 29999 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17987

  9. Andreas Kienast uploaded patch set 3 01/01/18, 19:57

  10. TYPO3com voted on patch set 3 V +1 01/01/18, 20:08 Completed build in 10m 12s on Mon, 1 Jan, 09:08 PM Test Summary: 29999 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-18010

  11. Tobi Kretschmann voted on patch set 3 CR +1 01/08/18, 09:59

  1. Markus Klein updated the commit message in patch set 4 01/08/18, 13:07

  2. Markus Klein commented on patch set 4 01/08/18, 13:08

    Pass the exception along with the log entry. there's a dedicated handling for this

    TcaInline.php:159

    'exception' => $e
  3. Markus Klein commented on patch set 5 01/08/18, 13:09

    Published edit on patch set 4.
  4. Markus Klein voted on patch set 5 CR +1 01/08/18, 13:09

  5. Stephan Großberndt voted on patch set 5 CR +1 01/08/18, 13:10

  6. Oliver Klee voted on patch set 5 CR +1 01/08/18, 13:12

  7. TYPO3com voted on patch set 4 V +1 01/08/18, 13:14 Completed build in 06m 45s on Mon, 8 Jan, 02:14 PM Test Summary: 30003 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-18158

  8. TYPO3com voted on patch set 5 V +1 01/08/18, 13:18 Completed build in 09m 21s on Mon, 8 Jan, 02:18 PM Test Summary: 30003 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-18159

  9. Andreas Kienast commented on patch set 5 01/08/18, 14:00

    Thanks for taking care, Markus!
  10. Reiner Teubner commented on patch set 5 01/22/18, 16:18

    When i delete the child and try this patch i got a Core: Exception handler (WEB): Uncaught TYPO3 Exception: Call to a member function warning() on null | Error thrown in file /var/www/public/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaInline.php in line 159.
  11. Andreas Kienast uploaded patch set 6 01/22/18, 17:23

  12. Markus Klein commented on patch set 6 CR +1 01/22/18, 17:28

    thx andy
  13. TYPO3com voted on patch set 6 V +1 01/22/18, 17:31 Completed build in 07m 35s on Mon, 22 Jan, 06:31 PM Test Summary: 30193 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-18524

  14. Reiner Teubner voted on patch set 6 V +1 CR +1 01/22/18, 18:02

  15. Wouter Wolters voted on patch set 6 CR +1 01/22/18, 19:18

  16. Tobi Kretschmann voted on patch set 6 CR +1 01/22/18, 21:59

  17. Christian Kuhn voted on patch set 6 V +1 CR +1 01/24/18, 10:48

  18. Andreas Kienast commented on patch set 6 01/24/18, 12:36

    FYI: Backport to 8.7 needs some special treatment, will take care of it.
  19. Andreas Kienast commented on patch set 6 V -1 01/24/18, 16:03

    Need to take a closer look at some stuff
  20. Andreas Kienast commented on patch set 6 01/24/18, 18:30

    Patch has no effect on localized records - on 8.7 it's even worse
  21. Andreas Kienast uploaded patch set 7 01/24/18, 19:13

  22. TYPO3com voted on patch set 7 V +1 01/24/18, 19:21 Completed build in 08m 42s on Wed, 24 Jan, 08:21 PM Test Summary: 30301 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-18596

  23. Reiner Teubner voted on patch set 7 V +1 CR +1 01/25/18, 08:42

  24. Andreas Wolf voted on patch set 7 V +2 CR +2 01/27/18, 11:10

  25. Andreas Wolf merged patch set 8 01/27/18, 11:10