Review main Merged

81956[BUGFIX] Prevent JS SyntaxError on extension installation

Oli Bartsch CR +2 V +2 Normal +63 −47 updated 11/26/23, 19:51

Commit message

In case an extension should be installed
via the extension manager, containing code
which might stop the PHP request, e.g. the
common "defined('TYPO3_MODE') or die();" check,
the corresponding JS component does no longer
generate a SyntaxError on calling .json()
on the empty response body.

Instead, the error is caught and the integrator
is being informed via a flash message.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Jochen Roth +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Jochen Roth +1
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 1519

  1. Oli Bartsch uploaded patch set 1 11/24/23, 16:49

  2. core-ci voted on patch set 1 V +1 11/24/23, 16:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49898

  3. Jochen Roth voted on patch set 1 CR +1 V +1 11/24/23, 17:01

  4. Benjamin Franzke commented on patch set 1 CR -1 11/24/23, 17:06

    repository.ts:109

    looks wrong, we should rather use `try … catch` around `await response.raw.json()`. will look into it.
  5. Oli Bartsch uploaded patch set 2 CR +1 V +1 11/24/23, 17:46

  6. Oli Bartsch commented on patch set 2 11/24/23, 17:50

    repository.ts:109 Reply

    Totally right. `try ... catch` is the way to go. Changed the patch accordingly. Please don't hesitate to adjust it, if you like.
  7. core-ci voted on patch set 2 V +1 11/24/23, 17:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49900

  8. Oli Bartsch uploaded patch set 3 V +1 11/24/23, 17:52

  9. core-ci voted on patch set 3 V +1 11/24/23, 17:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49901

  10. Christian Kuhn voted on patch set 3 CR +1 V +1 11/25/23, 15:24

  11. Jochen Roth voted on patch set 3 CR +1 V +1 11/25/23, 18:19

  12. Simon Schaufelberger commented on patch set 3 11/25/23, 20:14

    An extension. since the patch has already some positive votes, I don't want to destroy them again.
  13. Oli Bartsch updated the commit message in patch set 4 CR +1 V +1 11/26/23, 17:50

  14. Oli Bartsch commented on patch set 4 11/26/23, 17:52

    Reply

    Thanks for the hint.
  15. core-ci voted on patch set 4 V +1 11/26/23, 17:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49952

  16. Jochen Roth voted on patch set 4 CR +1 V +1 11/26/23, 18:16

  17. Christian Kuhn voted on patch set 4 CR +1 V +1 11/26/23, 18:49

  18. Oli Bartsch voted on patch set 4 CR +2 V +2 11/26/23, 19:51

  19. Oli Bartsch merged patch set 5 11/26/23, 19:51