Review main Merged

70762[TASK] Obsolete NotFoundView and deprecate canRender()

Christian Kuhn CR +2 V +2 Hard +59 −208 updated 08/26/21, 16:28

Commit message

Extbase ActionController has a view functionality to
test if the target template files exist and to render
an error message via NotFoundView if not.

This is the only use of @internal marked NotFoundView
and the only practical usage of extbase ViewInterface
canRender().

This structure can be simplified significantly, without
loosing functionality. The patch:

* Removes @internal NotFoundView and its template
* Drops canRender() from ViewInterface
* Keeps canRender() in extbase ViewInterface implementations
  but marks them @deprecated and logs usages.
* Changes extbase ActionController to not test canRender()
  but to let InvalidTemplateResourceException bubble up
  during $view->render().

This handling as a result - in case of missing templates -
provides a full backtrace with a better error message than
before, that of course still includes the controller and action
name, plus the template location that has not been found.

In the frontend, the exception is handled by the casual
"plugin based exception handling"
(TypoScript config.contentObjectExceptionHandler), a
"template missing" programming error is now handled
just like any other plugin exception.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 12