[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:core-ci <typo3@b13.com> Tested-by:
Jochen <rothjochen@gmail.com> Tested-by:
Wouter Wolters <typo3@wouterwolters.nl> Tested-by:
Oliver Bartsch <bo@cedev.de> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Jochen <rothjochen@gmail.com> Reviewed-by:
Wouter Wolters <typo3@wouterwolters.nl> Reviewed-by:
Oliver Bartsch <bo@cedev.de> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch>
Showing
- typo3/sysext/backend/Classes/View/BackendTemplateView.php 4 additions, 3 deletionstypo3/sysext/backend/Classes/View/BackendTemplateView.php
- typo3/sysext/core/Documentation/Changelog/master/Deprecation-95003-ExtbaseViewInterfaceCanRender.rst 41 additions, 0 deletions...aster/Deprecation-95003-ExtbaseViewInterfaceCanRender.rst
- typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php 0 additions, 9 deletions...ysext/extbase/Classes/Mvc/Controller/ActionController.php
- typo3/sysext/extbase/Classes/Mvc/View/AbstractView.php 3 additions, 2 deletionstypo3/sysext/extbase/Classes/Mvc/View/AbstractView.php
- typo3/sysext/extbase/Classes/Mvc/View/EmptyView.php 3 additions, 2 deletionstypo3/sysext/extbase/Classes/Mvc/View/EmptyView.php
- typo3/sysext/extbase/Classes/Mvc/View/JsonView.php 3 additions, 2 deletionstypo3/sysext/extbase/Classes/Mvc/View/JsonView.php
- typo3/sysext/extbase/Classes/Mvc/View/NotFoundView.php 0 additions, 155 deletionstypo3/sysext/extbase/Classes/Mvc/View/NotFoundView.php
- typo3/sysext/extbase/Classes/Mvc/View/ViewInterface.php 0 additions, 8 deletionstypo3/sysext/extbase/Classes/Mvc/View/ViewInterface.php
- typo3/sysext/extbase/Resources/Private/MVC/NotFoundView_Template.html 0 additions, 2 deletions.../extbase/Resources/Private/MVC/NotFoundView_Template.html
- typo3/sysext/extbase/Tests/Unit/Mvc/Controller/ActionControllerTest.php 3 additions, 3 deletions...xtbase/Tests/Unit/Mvc/Controller/ActionControllerTest.php
- typo3/sysext/fluid/Classes/View/AbstractTemplateView.php 2 additions, 0 deletionstypo3/sysext/fluid/Classes/View/AbstractTemplateView.php
- typo3/sysext/fluid/Classes/View/TemplateView.php 0 additions, 22 deletionstypo3/sysext/fluid/Classes/View/TemplateView.php
Please register or sign in to comment