Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • C CMS
  • Project information
    • Project information
    • Activity
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare
    • Locked Files
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • typo3typo3
  • CI
  • CMS
  • Repository
Switch branch/tag
  • cms
  • ..
  • Controller
  • ActionController.php
Find file BlameHistoryPermalink
  • Christian Kuhn's avatar
    [TASK] Obsolete NotFoundView and deprecate canRender() · c118510b
    Christian Kuhn authored Aug 26, 2021
    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's avatarcore-ci <typo3@b13.com>
    Tested-by: Jochen's avatarJochen <rothjochen@gmail.com>
    Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
    Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
    Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
    Reviewed-by: Jochen's avatarJochen <rothjochen@gmail.com>
    Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
    Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
    Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
    c118510b