When template is automatically retrieved but not found, a hint about the tried location should be present
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).
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 :)
Updated by Bastian Waidelich over 8 years ago
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