Skip to content
Snippets Groups Projects
user avatar
Christian Kuhn authored
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>
c118510b
History
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Name Last commit Last update
..