-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Request::getPathInfo() sometimes returns "_fragment" #7138
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
This is entirely expected: when rendering a template in a subrequest, |
I think it's a valid concern, this is clearly a limitation of the framework, there are simple use cases such highlighting the current tab of a menu which cannot be achieved in some situations because of this. Maybe the notion of parent request should be introduced? |
We cannot have a notion of parent request, as the fragments are not always rendered from inside the handling of a parent request. |
I agree with you, in some situations there is no parent request, I'm
|
I see. It might be useful to put this in the s2.2 changelog file, because |
|
* 2.2: Defined stable version point of Doctrine. [HttpFoundation] Remove Cache-Control when using https download via IE<9 (fixes #6750) Update composer.json [Form] Fixed TimeType not to render a "size" attribute in select tags [Form] Added test for "label" option to accept the value "0" Expanded fault-tolerance for unusual cookie dates Fix docblock type [Form] Fixed "label" option to accept the value "0" Added greek translation merged branch jfcixmedia/2.1 (PR #5838) added a note about a BC break for the path info of sub-request (closes #7138) [DomCrawler] lowered parsed protocol string (fixes #6986) [FrameworkBundle] Fix a BC for Hinclude global template [HttpKernel] fixed locale management when exiting sub-requests fixed HInclude renderer (closes #7113) Removed some leaking deprecation warning in the Form component [HttpKernel] hinclude fragment renderer must escape URIs properly to return valid html Conflicts: src/Symfony/Bundle/FrameworkBundle/composer.json src/Symfony/Component/Security/composer.json
zzzzz |
Imagine the following route:
Now you're visiting this page and you want to print the page url:
Request::getPathInfo() returns
/profile/1337
as expected.Now I'm rendering a fragment in the same template:
Request::getPathInfo() returns
_fragment
.The text was updated successfully, but these errors were encountered: