Review main Merged

71500[BUGFIX] Catch UnknownLinkHandlerException in view helper

Oli Bartsch CR +2 V +2 Easy +2 −1 updated 10/08/21, 08:11

Commit message

EXT:redirect is using the TargetPageIdViewHelper to
get the page ID from a "t3://page?uid=" link. If this link
is however somehow malformed, e.g. "t3://page=uid=",
this previously lead to an exception being thrown, making
the redirects module unusable for an editor. Since an
editor usually does not have access to pid=0, it needed
an administrator to make the module accessible again.

This is now fixed by catching this exception in the
view helper.

Review

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

Issues 1

Files 1

Review log 45

  1. Oli Bartsch uploaded patch set 1 10/07/21, 21:57

  2. core-ci voted on patch set 1 V +1 10/07/21, 22:18 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17786

  3. Sybille Peters commented on patch set 1 V +1 CR +1 10/08/21, 06:39

    Without the patch: Created a redirect with target "t3://page=uid=" in redirects module. Got exception on saving. Redirects module unusable because of exception. With patch: Can now view redirects module and filter again. Can create a new redirect with same problem without exception. The downside is, I no longer get exception so I don't realize there is a problem with what I just did. However, perhaps this could be handled in a separate patch. This patch fixes a problem with can be pretty severe because you cannot solve it yourself easily in the BE, so would be great if this can be merged in quickly. (Also, if there are hits on the redirect, an exception will be shown in FE and error will be logged, so in well administrated sites, this will not go unnoticed.)
  4. Benni Mack voted on patch set 1 V +2 CR +2 10/08/21, 08:11

  5. Benni Mack merged patch set 2 10/08/21, 08:11