Details
-
Bug
-
Resolution: Fixed
-
Critical
-
5.1.0rc1, 2013.4
-
None
Description
When doing a subrequest, you lose critical information like the siteaccess, or the semanticPathinfo (used by helper ezpublish.requestedUriString).
When using ESI or Hinclude strategies, it's really problematic since the default siteaccess is used then and thus the right configuration is not used and links are not generated correctly.
Steps to reproduce
- Use a siteaccess that is not your default one
- Create your pagelayout.html.twig
- On this template try to dump
{{ dump( ezpublish.requestedUriString ) }}
- Result is okay (for example i got "/" )
- Create an override (ex: welcome.html.twig)
- On this template try to dump ezpublish.requestedUriString
- Result is Okay (i got "/")
- Dump the siteaccess name ezpublish.siteaccess.name
- Create a subrequest using either Hinclude or ESI strategy on welcome.html.twig something like
{{ render_hinclude( controller( "AcmeDemoBundle:Test:MyAction" )) }}
- Create a template for this render and dump parameter and siteaccess name
- Result is ko (got null as answer for ezpublish.requestedUriString and my siteaccess is the default one).