Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Routing debug issues #2809

Closed
dmolineus opened this issue Feb 26, 2021 · 1 comment · Fixed by #2827
Closed

Routing debug issues #2809

dmolineus opened this issue Feb 26, 2021 · 1 comment · Fixed by #2827
Assignees
Labels
Milestone

Comments

@dmolineus
Copy link
Contributor

Affected version(s)

Contao 4.9

Description

I tried to debug some routes with vendor/bin/contao-console route:match but get following errors:

vendor/bin/contao-console route:match /preview.php/_wdt/205c80

In RouteProvider.php line 115:
                                                                                                                                                   
  Return value of Contao\CoreBundle\Routing\RouteProvider::getRouteByName() must be an instance of Symfony\Component\Routing\Route, null returned                                        

I locally fixed it with following condition, I'm able to select a route:

if (!isset($routes[$name])) {
    throw new RouteNotFoundException('Route name does not match a page ID');
}
 [OK] Route "tl_page.893.error_404" matches                                                                             
                                                                                                                        
 Select one of the matching routes:
  [0] tl_page.893.error_404.locale
  [1] tl_page.893.error_404

If I select any I get another error now:

  The route "tl_page.893.error_404" does not exist.  
@aschempp aschempp added the bug label Mar 3, 2021
@aschempp aschempp added this to the 4.9 milestone Mar 3, 2021
@aschempp
Copy link
Member

aschempp commented Mar 3, 2021

see #2827

@aschempp aschempp closed this as completed Mar 3, 2021
@aschempp aschempp self-assigned this Mar 3, 2021
@leofeyer leofeyer linked a pull request Mar 3, 2021 that will close this issue
leofeyer pushed a commit that referenced this issue Mar 4, 2021
Description
-----------

| Q                | A
| -----------------| ---
| Fixed issues     | Fixes #2809

Commits
-------

7e632f5 Fixed generating error pages by name
82e8fe7 Updated unit tests
98fbc92 Update core-bundle/src/Routing/RouteProvider.php

Co-authored-by: Leo Feyer <github@contao.org>
913ef08 CS
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants