-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[bug][Profiler] Route matching logs do not respect host in routing files #6744
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
Comments
Hi there, I've tried to replicate this by having the following configuration: _welcome:
pattern: /page/
hostname: fat-sf2
defaults: { _controller: AcmeDemoBundle:Welcome:index }
_welcome2:
pattern: /
hostname: m.fat-sf2
defaults: { _controller: AcmeDemo2Bundle:Welcome:index } I've tested against Best regards. |
Your example sounds right to me, but would it be because of imported routes (unlikely)? Possibly my version isn't newest. And apparently I cannot test with newest version at the moment because of #6730 |
Just checked out the newest version 6755546 and the bug still persists. Updated my code to reflect the newest changes on my side. |
This PR was merged into the 2.2 branch. Commits ------- 30b0c37 [Router] Fix TraceableUrlMatcher Discussion ---------- [BugFix][Router] Fix TraceableUrlMatcher TraceableUrlMatcher does not take care with new host route features | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #6744 | License | MIT | Doc PR | n/a
Checked out the newest version. Now while it shows Isn't really right - especially if there is another rule that actually match and shows that page after it, the logs is unable to show the matched route. i.e. in above example, if I have an additional rule:
It is unable to show the it matches |
I'm having another issue, maybe related to this, I've two routes, with both pattern (/pattern/{parameter}) just included in app/config/routing.yml with different hosts, in profiler the matching process goes through the routes but since I'm requesting sub2.site.com and first matching route with /pattern/{parameter} is the sub1.site.com host it stops there saying "Host "sub1" does not match the requirement ("{subdomain}.{domain}")" |
…s (karolsojko) This PR was merged into the 2.3 branch. Discussion ---------- [Routing] Fix router matching pattern against multiple hosts | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #8811, #6744 | License | MIT | Doc PR | When you had a pattern that matched on multiple host then only the first one was displayed as "almost matching". Fixed router matching against the same pattern on multiple hosts so now it shows every "almost match" on different hosts. Commits ------- f727b22 [Routing] Fix router matching pattern against multiple hosts
In the routing page under profiler, the route matching logs does not take
host
in the routing files into account, and giving inconsistent results with the actual routed page. This could be a hurdle in debugging.i.e. with the following configuration, going into
example.com
will showmobile_homepage
being matched, despite a 404 error is thrown.Always reproducible.
I am on Sf 2.2.0-DEV (6755546) with PHP 5.4.4 on Mac OS X 10.7.3
The text was updated successfully, but these errors were encountered: