-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Site id duplicated in subrequests when we have rewrite rules with _vh_ #17
Comments
this is my actual conf. This is the rewrite rule on apache:
I need vh because we need to append "/i/" to the url before Plone routes. I'm a bit confused about how subrequest should works.
and subrequest generates a path for subrequest like this:
that fetches the right resource. For tiles the things are different. p.a.blocks calls subrequest passing an url that could be:
I tried to set both of them to data attribute (data-tile) in my div.
and generates a path like this:
on second case (with this path: content-id/@@tile.type/tile_id), p.a.blocks add siteid to the path, and calls subrequest with this url:
that generates a path like this:
both of them are wrong and subrequest can't find the resource. |
I think I had the same problem expanding tiles and that I ended up with this patch which is project specific: Of course this is a workaround, I never had the time to submit a proper patch. |
I also use inside-out hosting with The nginx rewrite url like the following:
I do reference my tiles like that:
I don't have any patches in place and I do not experience any problems. I use latest Plone 5.1 and use the latest versions of plone.subrequest, plone.tiles, plone.app.blocks, etc. |
I would leave the issue open because you do not always want to have tiles relative to the current context. |
…n there is a reverse proxy configuration with (plone/plone.subrequest#17).
so do you think that there would be a generic fix to that in the product? |
I would say that would be the best |
@cekk for your COMPLETE_TILE_URL and PATH_TO_CONTEXT approach you were calling the tiles from a page template, not? I'm asking because I'm wondering how you construct the url. |
Yes, i have a view that could be applied to some content-types that shows tiles in that context. |
I'm seeing this behavior as well whenever I start a site behind VirtualHostRoot/VirtualHostBase/_vh_foo with eea.facetednavigation. The JavaScript to support the faceted display won't load and there's duplicated The workaround I've been using is to make sure the first request to a page with facets comes from |
I think I am seeing a related issue with a translated site where each language folder maps to a different domain. The issue is that the content browser to insert images / files / links / related content simply does not load anything, and I know for a fact it is related to VHM and subrequests. I hope this fixes the problem. |
With the latest |
I have the same problem as #13 and reverted in #14
I have a rewrite rule for one site with "vh" because i need to append a certain string on published url.
Everything works fine, except tiles.
I have some tiles in a view, with the basic data-tile attribute. When Plone tries to render them, plone.subrequest fails because it append the site id twice (siteid/_vh_siteid) in the url.
In my case, the patch proposed by @awello fix the problem, but it seems that breaks other components (like mosaic, that i don't use).
Any idea about how to fix it in a safe way? Or otherwise, any hint about a safe rewrite rule that don't break subrequests?
The text was updated successfully, but these errors were encountered: