Review main Merged

92104[BUGFIX] Provide user-friendly wrapper for unexpected DataHandler errors

Lina Wolf CR +2 V +2 Easy +15 −3 updated 12/12/25, 17:24

Commit message

Editors currently see raw, non-localized technical error messages when
the DataHandler encounters unexpected failures during saving. These
messages are confusing and not suitable for backend users.

As an interim improvement, the technical exception message is now wrapped
in a localized, user-friendly text. The original message is still
included as technical details.

This ensures clearer communication for editors while keeping diagnostic
information available.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Garvin Hicking +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Garvin Hicking +1
    • Rachel Foucard +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 2734

Show 89 earlier messages
  1. Lina Wolf uploaded patch set 1 12/11/25, 17:37

  2. Lina Wolf commented on patch set 1 12/11/25, 17:40

    To reproduce the error and verify the new behavior: 1. Remove `'ignorePageTypeRestriction' => true` from: typo3/sysext/styleguide/Configuration/TCA/ tx_styleguide_inline_1n_inline_1_child.php 2. Create a new "inline n1" record on a standard page. 3. Add new inline child records and attempt to save. Expected result: A user-friendly, localized error message is shown, followed by the technical details of the underlying DataHandler exception.
  3. Lina Wolf commented on patch set 1 12/11/25, 17:42

    If we backport this, the translation has to be done by calling sL(), I am willing to change this for the backport
  4. core-ci voted on patch set 1 V +1 12/11/25, 17:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92082

  5. Rachel Foucard voted on patch set 1 V +1 12/11/25, 20:08

  6. Georg Ringer commented on patch set 1 CR -1 12/11/25, 20:20

    DataHandler.php:751

    doesn't belong here

    DataHandler.php:3429

    doesn't belong here
  7. Christian Kuhn commented on patch set 1 12/11/25, 21:07

    DataHandler.php:9051

    talked with lina beforehand about this: this change basically frames the 'log' message a bit differently, making them better suitable for editors. that's fine as a non-intrusive patch without overhead or other foo. i'd like to +1 when the other remarks are done.
  8. Lina Wolf uploaded patch set 2 CR -1 V +1 12/12/25, 05:46

  9. Lina Wolf commented on patch set 2 12/12/25, 05:46

    DataHandler.php:751 Reply

    Done

    DataHandler.php:3429 Reply

    Done
  1. core-ci voted on patch set 2 V +1 12/12/25, 05:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92109

  2. Mathias Brodala commented on patch set 2 12/12/25, 07:56

    DataHandler.php:9051

    Tiny nitpick: the DataHandler API is not bound to forms, these messages will also occur in other contexts like own modules or CLI. So there should be another domain but "form" here.
  3. Lina Wolf commented on patch set 2 12/12/25, 07:59

    DataHandler.php:9051 Reply

    Note this is `core.form`, not `EXT:form`. `core.form` contains all backend form / TCA related strings like default palette names etc. It already exists.
  4. Mathias Brodala commented on patch set 2 12/12/25, 08:09

    DataHandler.php:9051 Reply

    Yes, but what I wrote still holds true. DataHandler is not bound to forms, even though it is mostly used like this. See e.g. External Import. But I won't insist, this is really a micro nitpick.
  5. Oliver Klee updated the commit message in patch set 3 V +1 12/12/25, 08:10

  6. Lina Wolf commented on patch set 3 12/12/25, 08:16

    DataHandler.php:9051 Reply

    When the datahandler is not used with a a form, who would display the flash message? I think in an import scenario the message would get logged but never displayed.
  7. core-ci voted on patch set 3 V +1 12/12/25, 08:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92113

  8. Lina Wolf uploaded patch set 4 V +1 12/12/25, 08:25

  9. Lina Wolf commented on patch set 3 12/12/25, 08:27

    DataHandler.php:9051 Reply

    I gave it another look and there are more datahandler specific labels (and more yet to come in the future) so I moved the label to `data_handler.xlf`
  10. core-ci voted on patch set 4 V -1 12/12/25, 08:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92114

  11. Lina Wolf uploaded patch set 5 V -1 12/12/25, 11:13

  12. Lina Wolf uploaded patch set 6 12/12/25, 11:14

  13. Christian Kuhn voted on patch set 6 CR +1 12/12/25, 11:24

  14. core-ci voted on patch set 5 V -1 12/12/25, 11:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92130

  15. core-ci voted on patch set 6 V -1 12/12/25, 11:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92131

  16. Lina Wolf updated the commit message in patch set 7 CR +1 V -1 12/12/25, 11:28

  17. core-ci voted on patch set 7 V +1 12/12/25, 11:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92135

  18. Christian Kuhn voted on patch set 7 CR +1 V +1 12/12/25, 12:01

  19. Rachel Foucard voted on patch set 7 V +1 12/12/25, 13:06

  20. Garvin Hicking voted on patch set 7 CR +1 V +1 12/12/25, 14:29

  21. Christian Kuhn voted on patch set 7 CR +2 V +2 12/12/25, 14:48

  22. Christian Kuhn merged patch set 8 12/12/25, 14:52

  23. Josef Glatz commented on patch set 8 12/12/25, 15:56

    Is it common to use a semicolon „;“ instead of a „.“?
  24. Garvin Hicking commented on patch set 8 12/12/25, 16:25

    Reply

    it's unleast not uncommon; I haven't check the codebase though. A semicolon is used here because two independent clauses are being linked in a single sentence. “This action could not be completed” is a complete sentence, and “please contact your administrator” is another. The semicolon separates them while signalling that the second clause follows directly as a related instruction.
  25. Josef Glatz commented on patch set 8 12/12/25, 17:24

    Reply

    ACK. Asked bebaute of german translation