plone / plone/plone.subrequest

Site id duplicated in subrequests when we have rewrite rules with _vh_

Open
#17 12 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2
Forks
2
Avg merge
1d 7h
Merged PRs (30d)
3

Description

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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the subrequest URL construction and rewrite-rule handling described in this issue, then compare the reverted change in #14 with the proposed patch from #13. Reproduce the basic data-tile failure and check affected components such as Mosaic; done means avoiding the duplicated site id without breaking those other components.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.