Feature #40857

When template is automatically retrieved but not found, a hint about the tried location should be present

Added by Adrian Föder almost 9 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
MVC
Start date:
2012-09-12
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

Currently, Fluid throws a nice exception when a template file couldn't be found at a tried location.
FLOW3, however, eats this exception and gives a generic "No template was found. View could not be resolved for action ..."
This should be augmented with the tried path which can give a perfect hint why the file was not found (eg a simple typo or a controller name the developer wasn't aware of).


Related issues

Related to TYPO3.Flow - Feature #39423: Custom Error RenderersResolvedBastian Waidelich2012-12-25

Actions
Related to TYPO3.Flow - Feature #42176: Improve resolving of viewResolvedMarc Neuhaus2012-10-19

Actions
Related to TYPO3.Flow - Bug #40888: Add ViewNotFoundExceptionResolvedBastian Waidelich2012-09-13

Actions
#1

Updated by Adrian Föder almost 9 years ago

  • Tracker changed from Bug to Feature
#2

Updated by Gerrit Code Review over 8 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17072

#3

Updated by Karsten Dambekalns over 8 years ago

  • Status changed from Under Review to Resolved
  • Target version set to 2.0 beta 1
  • % Done changed from 0 to 100
#4

Updated by Karsten Dambekalns over 8 years ago

  • Status changed from Resolved to Needs Feedback
  • Target version changed from 2.0 beta 1 to 2.0

Adrian commented on the change:

allow me to ask, why this is annotated to fix #40857? I still can't see which template location(s) were tried in order to determine the view... Still the canRender() method of the action will eat the exception thrown in Fluid.
...and at all, what I just realize: the ->canRender() method is not invoked at all anymore, hence some not found stuff will happen pretty late(r). Is that intentional?
Thanks for clarification :)

#5

Updated by Bastian Waidelich over 8 years ago

Hi Adrian,

I still can't see which template location(s) were tried in order to determine the view...

Really? If I remove/rename a template I now get an exception

#1225709595: Template could not be loaded. I tried "resource://My.Package/Private/Templates/Standard/Index.html" 

Still the canRender() method of the action will eat the exception thrown in Fluid.

ViewInterface::canRender() is not called any longer, as you realized. (and i just realized: we should remove the @api annotation).
The reason is, that this was called very early in the dispatching process preventing the framework to "hook in" (we later need this in order to overwrite template paths from the "outside", see #42176 for details). We also need this now in order to get rid of the "NotFoundView" – otherwise you'd always need a template for an action, even if that returns its content directly

#6

Updated by Adrian Föder over 8 years ago

  • Status changed from Needs Feedback to Resolved

ok, clarified via IRC :) My missing link was, that the patch set in question solved this issue rather as a side effect, hence me didn't see explicitly why that was the case.

#7

Updated by Bastian Waidelich over 8 years ago

  • Target version changed from 2.0 to 2.0 beta 1

Also available in: Atom PDF