[JSS 22 Vue] RichText routeHandler drops query string from internal links during SPA navigation
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript, typescript
- Domain
- frontend
Research direction
Start at the Vue 3 JSS RichText component's routeHandler method and inspect how it builds the SPA navigation destination from the internal link target. Reproduce the Sitecore Rich Text link with query parameters, then verify that navigation preserves the pathname, query string, and hash.
Written by the indexing model from the issue text.
Description
Describe the Bug
The RichText component's routeHandler method builds the navigation destination using only target.pathname and target.hash, omitting target.search. Internal links with query parameters lose their query string during client-side routing.
const destination = target.hash ? `${target.pathname}${target.hash}` : target.pathname;
To Reproduce
- Add an internal link with query parameters to a Rich Text field in Sitecore, e.g.
/my-page?type=foo§ion=bar - Render it using the Rich Text component in a Vue 3 JSS app
- Click the link
- The app navigates to
/my-pageand query parameters are stripped
Expected Behavior
The full URL including query string should be preserved during SPA routing
Possible Fix
Include target.search alongside with the target.hash and target.pathname
Provide environment information
- Sitecore Version: 10.4.1 + JSS 22.0 (Headless)
- JSS Version: @sitecore-jss/sitecore-jss-vue 22.9.1
- Browser Name and version: not browser specific
- Operating System and version (desktop or mobile): not OS specific
- Link to your project (if available): N/A
- Dominant language
- TypeScript
- Stars
- 274
- Forks
- 274
- Avg merge
- 11m
- Merged PRs (30d)
- 1
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.
More from Sitecore/jss
-
sitecore-jss-rendering-host: webpack is still a runtime dependency for devServer, retired in #1426 Open
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Experience Editor error: variantswitcher.js expects array but /sxa/switcher/available returns object Open🐞 bug
Difficulty 3/5 1-2 days Newbie friendliness 72/100
-
🐞 bug backlog
Difficulty 4/5 3-5 days Newbie friendliness 38/100
-
🐞 bug backlog
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
🐞 bug backlog
Difficulty 4/5 3-5 days Newbie friendliness 38/100
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100