Review main Merged

73470[BUGFIX] Prevent adding invalid LinkButton in edit document

Oli Bartsch CR +2 V +2 Normal +19 −36 updated 02/14/22, 10:40

Commit message

Prior to #96777, the preview url for tor "view" button was
created using BackendUtility::getPreviewUrl), which threw
an exception, in case no link could be created.

With the change to use the PreviewUriBuilder directly,
no such exception is thrown, but buildUri() just returns
NULL. This then lead an invalid link exception, in the
EditDocumentController, since a LinkButton has to
provide a target.

This is now fixed by removing the try/catch and just
checking the generated preview uri for not being empty.

The same is done at the other places, which got adjusted
in the related patch.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Jochen Roth +1
  • Verified V +2 Done
    • Benni Mack +2
    • Jochen Roth +1
    • core-ci +1 CI

Issues 2

Files 4

Review log 45

  1. Oli Bartsch uploaded patch set 1 02/14/22, 10:15

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

  3. Jochen Roth voted on patch set 1 V +1 CR +1 02/14/22, 10:28

  4. Benni Mack voted on patch set 1 V +2 CR +2 02/14/22, 10:40

  5. Benni Mack merged patch set 2 02/14/22, 10:40