Skip to content

IBX-12102: Fixed SiteAccess context being lost after fragment sub-requests - #802

Open
tbialcz wants to merge 2 commits into
4.6from
IBX-12102-siteaccess-not-restored-after-fragment-sub-request
Open

IBX-12102: Fixed SiteAccess context being lost after fragment sub-requests#802
tbialcz wants to merge 2 commits into
4.6from
IBX-12102-siteaccess-not-restored-after-fragment-sub-request

Conversation

@tbialcz

@tbialcz tbialcz commented Aug 10, 2026

Copy link
Copy Markdown
Contributor
🎫 Issue IBX-12102

Description:

In Page Builder, every URL generated after a page block (or any render_esi) lost the
SiteAccess prefix, e.g. // instead of /site_fr/.

Why it happened:

  1. Each fragment sub-request overwrites the shared SiteAccess object, and nothing switched
    it back when the fragment finished. Fixed with a new kernel.finish_request listener
    that brings back the parent request's SiteAccess (same as Symfony does for its router).
  2. On top of that, the SiteAccess sent to the fragment could be serialized before the
    URIElement matcher computed its URI elements, so after deserialization the matcher
    produced //. Now the elements are computed before serialization.

Origin: (1) is as old as the SiteAccess matching layer itself; (2) came with EZP-31810
(Sep 2020), which started serializing the raw, lazily-initialized property.

For QA:

  1. Add a site_fr siteaccess (URI matching) and put
    {{ path('ibexa.url.alias', { locationId: 2 }) }} at the end of pagelayout.html.twig.
  2. Edit the home page in Page Builder for site_fr: without a block, then add a block,
    publish and edit again.
  3. Expected: the URL is always /site_fr/ (before the fix: // once a block is on the page).
  4. Regression: frontend with fragments, back office, content preview across siteaccesses.

Documentation:

None.

@tbialcz tbialcz added Bug Something isn't working Ready for review labels Aug 10, 2026
@tbialcz
tbialcz requested a review from a team August 10, 2026 05:24
@tbialcz
tbialcz force-pushed the IBX-12102-siteaccess-not-restored-after-fragment-sub-request branch 2 times, most recently from 6b7eb3c to b070c59 Compare August 10, 2026 05:31
@tbialcz
tbialcz force-pushed the IBX-12102-siteaccess-not-restored-after-fragment-sub-request branch from b070c59 to abce25a Compare August 10, 2026 05:32
@Steveb-p

Steveb-p commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Makes sense.

Note (to self mostly) that #798 (6.0) will need slight adjustments once this lands.

@tbialcz

tbialcz commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Makes sense.

Note (to self mostly) that #798 (6.0) will need slight adjustments once this lands.

OK, once #798 lands, its stack pop does the same job, so my listener can go away on 6.0.

Comment thread tests/lib/MVC/Symfony/Component/Serializer/URIElementNormalizerTest.php Outdated
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Ready for QA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants