Skip to content

Forward advanced-search link state when query is empty (bootstrap theme)#3177

Merged
marevol merged 5 commits into
masterfrom
fix/bootstrap-theme-advance-label-without-query
Jun 25, 2026
Merged

Forward advanced-search link state when query is empty (bootstrap theme)#3177
marevol merged 5 commits into
masterfrom
fix/bootstrap-theme-advance-label-without-query

Conversation

@ytachiki

@ytachiki ytachiki commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the bootstrap theme so the "Advanced" search links keep the current view state even when there is no search query.

Previously, updateAdvanceLinks() in themes/bootstrap/assets/app.js returned early and reset every /search/advance link to a bare /search/advance whenever q was empty. As a result, browsing by label (e.g. ?fields.label=... with no q) and then clicking "Advanced" dropped the selected label, language, num, and sort state.

Changes

  • Remove the empty-query early return in updateAdvanceLinks().
  • Always forward num, sort, lang, and fields.label from the current URL onto the advanced-search links; include q only when present.
  • Omit the ? separator when no parameters are forwarded (link stays /search/advance).
  • Update the JSDoc to match the new behavior.

This aligns the SPA behavior with the classic JSP theme (fe:pagingQuery(null)), which forwards state params regardless of whether a query is set. The consumer side (advance.js prefillFromUrl()) already pre-seeds these fields independently of q, so no consumer change is needed.

Behavior

Case Before After
No query, no params /search/advance /search/advance
No query, label selected /search/advance (label lost) /search/advance?fields.label=...
Query present unchanged unchanged

Test

Existing BundledBootstrapThemeTest.test_appJs_advanceLinkForwardsPagingParams continues to pass (the num/sort/lang/fields.label forwarding assertions are unaffected).

marevol and others added 5 commits June 18, 2026 11:43
…er (#3153)

The /api/v2/ui/config endpoint consumed by the static themes built
features.installation_link via SystemHelper#getHelpLink("installation"),
which concatenates online.help.base.link + "installation-guide.html" and
produced .../admin/installation-guide.html. The correct page is the
online.help.installation template (.../install/install.html), as already
resolved by the legacy JSP path. The same divergence affected eol_link
("eol" -> .../admin/eol-guide.html instead of .../eol.html).

Centralize link resolution in SystemHelper#getInstallationLink() and
#getEolLink() so the API and JSP paths share one implementation, and fix
UiConfigHandler to use them.

Claude-Session: https://claude.ai/code/session_017X3Vhm2U2pU7m12B8Q6JBw
…ut query

updateAdvanceLinks() was resetting the advance link href to /search/advance
when q was empty, discarding fields.label, lang, num, and sort. This caused
label filters set from the search top page to not be carried over to the
advanced search form.
@marevol marevol changed the title Fix/bootstrap theme advance label without query Forward advanced-search link state when query is empty (bootstrap theme) Jun 25, 2026
@marevol marevol added this to the 15.8.0 milestone Jun 25, 2026
@marevol marevol merged commit 7c651bd into master Jun 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants