Review main Merged

73448[BUGFIX] Catch non-okayish responses in Modal requests

Andreas Kienast CR +2 V +2 Easy +17 −4 updated 02/14/22, 14:56

Commit message

If the modal component starts an AJAX request that results in a
non-okayish response (>= 400), the underlying fetch() throws an error
that is now caught.

If the response sends an optional body, it is rendered in the modal. If
an empty body is received, a fallback text explaining the issue is
rendered instead.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Christian Kuhn +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1214

  1. Andreas Kienast uploaded patch set 1 02/12/22, 11:08

  2. core-ci voted on patch set 1 V +1 02/12/22, 11:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23444

  3. Stefan Bürk commented on patch set 1 02/12/22, 17:14

    Do you have a quick example how to test/verify this ? (generate a >400 for a modal) ...
  4. Christian Kuhn commented on patch set 1 02/12/22, 17:48

    Reply

    there is an early if in NewContentElementController that can be used to return 403
  5. Christian Kuhn voted on patch set 1 V +1 CR +1 02/14/22, 08:55

  6. Christian Kuhn commented on patch set 1 02/14/22, 08:55

    Reply

    Done
  7. Benjamin Franzke commented on patch set 1 CR -1 02/14/22, 09:26

    Modal.ts:488

    Missing html escaping
  8. Benjamin Franzke commented on patch set 1 02/14/22, 09:27

    Modal.ts:488 Reply

    I mean for ${configuration.content}. So better use .text() for the fallback text, not `.append()`.
  9. Benjamin Franzke uploaded patch set 2 02/14/22, 14:02

  10. Benjamin Franzke commented on patch set 2 02/14/22, 14:02

    Modal.ts:488 Reply

    Done
  11. core-ci voted on patch set 2 V +1 02/14/22, 14:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23517

  12. Christian Kuhn voted on patch set 2 V +1 CR +1 02/14/22, 14:33

  13. Benjamin Franzke voted on patch set 2 V +2 CR +2 02/14/22, 14:56

  14. Benjamin Franzke merged patch set 3 02/14/22, 14:56