Skip to content
Snippets Groups Projects
Commit c118510b authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] Obsolete NotFoundView and deprecate canRender()

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.

Resolves: #95003
Releases: master
Change-Id: I5e55fdb2f1cfa66682b3b3a6ad0ebd21188dc10e
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70762


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarJochen <rothjochen@gmail.com>
Tested-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarJochen <rothjochen@gmail.com>
Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 031c2389
Branches
Tags
No related merge requests found
Showing
with 59 additions and 208 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment