UVE: Same-path query-string navigation does not re-render traditional pages with filter params
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Problem Statement
On traditional (VTL) pages, filters that rely on same-path query parameters (e.g. ?anno_pubblicazione=2025) work correctly on the live frontend, but fail in UVE Edit/Preview.
Impact
Editors cannot validate query-driven filters (year/archive filters, faceted search, etc.) inside the backend page editor.
Affects traditional pages rendered in UVE via injected HTML (about:blank + document.write), not cross-page navigation.
Observed customer behaviour
Live frontend: clicking a filter reloads with ?anno_pubblicazione=2025 and applies the filter.
Backend Edit/Preview: page appears to refresh; query param is not shown in the UVE URL bar; filter is not applied.
Secondary log warning during render:
WARN render.ContainerRenderedBuilder:
Cannot invoke "Object.toString()" because the return value of
"org.apache.velocity.runtime.parser.node.Node.value(...)"
is null
(This WARN is likely a follow-on when VTL uses a missing request parameter; not the primary cause.)
Working theory (high confidence after internal repro) UVE intentionally skips pageLoad() for same-pathname navigations that only change hash/query (isSamePageNavigation / handleInternalNav, introduced with #35326 for hash anchors). For traditional pages the preview iframe is empty/about:blank with HTML injected via document.write(). Leaving the click to the browser causes uncontrolled iframe navigation; UVE never calls /api/v1/page/render/... with the new query params. Visual outcome may be blank iframe or refresh back to the previous unfiltered render (e.g. onIframeLoad rewriting stored HTML), depending on link shape and environment. In both cases the editor URL/state never gains the filter param.
Out of scope / confirmed OK
Links to a different page path (with or without query params) correctly call pageLoad() and preserve params.
Backend Page Render API preserves arbitrary query params when they are supplied on the request.
Steps to Reproduce
https://drive.google.com/file/d/1T8v4p1V_MNdXbCqwh048YpkEeUSTjntb/view?usp=sharing
Create a traditional page, e.g. /media/agenda (or /media/agenda/index.html).
Add content/VTL with same-path filter links, matching customer style:
<p>
Param =
#if($UtilMethods.isSet($request.getParameter("anno_pubblicazione")))
$request.getParameter("anno_pubblicazione")
#else
MISSING
#end
</p>
<a href="/media/agenda/index.html?anno_pubblicazione=2025">Year 2025</a>
<a href="/about-us">Other page</a>
(Absolute same-host URLs also reproduce, e.g. https://demo.dotcms.com/media/agenda/index.html?anno_pubblicazione=2025.)
Control – Live: open the public page, click Year 2025.
Expect URL includes ?anno_pubblicazione=2025 and Param = 2025.
Bug – UVE Edit/Preview: open the same page in the admin editor. Open DevTools → Network (filter page/render). Click Year 2025.
Actual
UVE URL bar does not gain anno_pubblicazione.
Preview goes blank and/or refreshes without applying the filter (Param = MISSING).
No new /api/v1/page/render/...?anno_pubblicazione=2025 (may see a plain document request to the live page URL with the query instead).
Click Other page.
Navigation goes through UVE pageLoad / Page Render API as expected.
Acceptance Criteria
- In UVE Edit and Preview, clicking a same-pathname link that only changes the query string reloads the page through the Page Render API with those query params applied (e.g. anno_pubblicazione=2025 available to $request.getParameter(...) / equivalent).
- UVE page URL / pageParams reflect the new query parameters after that navigation.
- Traditional-page preview does not go blank solely because of same-path query navigation.
- Pure hash-only same-page anchors (#section) still scroll in-page and do not trigger a full page reload.
- Navigation to a different pathname (with or without query params) continues to work via pageLoad() as today.
- Automated coverage: same-path query-only navigation triggers pageLoad with the new params for traditional pages (update/replace current tests that assert the opposite).
- Live frontend filter behavior remains unchanged.
dotCMS Version
Evergreen 26.07.13-01;
also reproducible on demo.
Severity
Medium - Some functionality impacted
Links
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the UVE isSamePageNavigation and handleInternalNav entry points, then inspect the existing tests that assert same-path query navigation is skipped. Reproduce the traditional-page case and trace pageLoad and the Page Render API request. Done means query-only navigation reloads with its parameters while hash-only anchors still scroll and other-page navigation remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100