Feature #37765

Display detailed informations within the "Could not resolve a route" exception why FLOW3 URI building has failed.

Added by Martin Brüggemann about 3 years ago. Updated over 2 years ago.

Status:Resolved Start date:2012-06-05
Priority:Must have Due date:
Assigned To:Bastian Waidelich % Done:

100%

Category:MVC - Routing
Target version:-
PHP Version: Complexity:
Has patch:No

Description

If you are trying to build a link in a Fluid template that can't be resolved FLOW3 throws a complex exception that doesn't explain in detail why the exception was thrown.

Could not resolve a route and its corresponding URI for the given parameters. This may be due to referring to a not existing package / controller / action while building a link or URI. Refer to log and check the backtrace for more details. (More information)

I know the details are logged in the System_Development.log file but beginners won't recognize this:

WARNING   FLOW3  Router resolve(): Could not resolve a route for building an URI for the given route values.
    @action => index
    @controller => asdasdasd
    @package => example.mymodule

FIX: The exception should directly display the problem - I even would like to see where the bad route is defined (path of the fluid template,...).

I also think that it is a bit to restrictive to throw an exception for such a "small" problem.


Related issues

related to TYPO3.Fluid - Feature #4704: Improve parsing exception messages New 2009-09-20
related to TYPO3.Fluid - Feature #30777: Catch Routing Exceptions in uri and link ViewHelpers Resolved 2011-10-11

History

#1 Updated by Martin Brüggemann about 3 years ago

  • Subject changed from Display detailed informations in the exception why FLOW3 URI building has failed. to Display detailed informations within the "Could not resolve a route" exception why FLOW3 URI building has failed.

#2 Updated by Bastian Waidelich about 3 years ago

Martin Brüggemann wrote:

I also think that it is a bit to restrictive to throw an exception for such a "small" problem.

This shouldn't be the case anymore since #30777 - maybe it has been re-introduced?
In any case should the exception message contain more details or - at least - a pointer to the logs.

#3 Updated by Karsten Dambekalns about 3 years ago

  • Status changed from New to Needs Feedback

#4 Updated by Bastian Waidelich about 3 years ago

Bastian Waidelich wrote:

This shouldn't be the case anymore since #30777 - maybe it has been re-introduced?

To reply to myself:
This has been fixed partly: The exceptions are caught and ViewHelper Exceptions are thrown instead in uri.* or link.* ViewHelpers.
In Production context this exception is caught and silently ignored (see #30935) - so at least the template is rendered, but with broken links.
In Development context the exception is thrown.

In the long run, ViewHelper exceptions should be caught be the Fluid parser/renderer with a pointer to the causing template. There's a 3 years old issue for that: #4704 - time to fix this!

#5 Updated by Bastian Waidelich over 2 years ago

  • Status changed from Needs Feedback to Resolved
  • % Done changed from 0 to 100

This has been (mainly) resolved with #42135
The exception now looks like

No controller object was found for package "wwwision.test", subpackage "", controller "bar" in route "Flow :: default with action and format" 

For Fluid it would still be nicer, if exceptions would be displayed inline somehow (so that you can determine where exactly the template is broken) but that's another issue (and there's a ticket for that: #4704)

Also available in: Atom PDF