Skip to content

Register the @querystringSearch route - #267

Merged
sneridagh merged 1 commit into
mainfrom
fix/querystring-search-route
Oct 11, 2026
Merged

sneridagh merged 1 commit into
mainfrom
fix/querystring-search-route

Conversation

@sneridagh

@sneridagh sneridagh commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

The Querystring widget fetches its results preview from /@querystringSearch. The loader exists in packages/cmsui/routes/querystringSearch.tsx, but the route was never registered in packages/cmsui/config/routes.ts. Requests fell through to the publicui * content route, the root middleware called getContent('/@querystringSearch'), and the response was a 404.

Changes

  • Register @querystringSearch as a prefix route, like @queryStringOptions.
  • Add an acceptance test that requests the route as a logged-in editor and checks it returns the matching content as JSON. Both tests fail with a 404 without the fix.
  • Add a news fragment.

Notes

  • No form on main renders the Querystring widget yet, because the Listing block has no settings schema. That arrives with listing block #107, which contains the same route registration, so the test exercises the route directly instead of the UI preview.
  • After Let resource routes skip the root content middleware #265, @ resource routes skip the root content middleware by default. This route only uses ploneClientContext, so it needs no skipContent flag.
  • When listing block #107 rebases, its loader expects ?query= to be the full querystring object, while this test sends the bare criteria array. The test will need to follow.

The Querystring widget fetches its results preview from
/@querystringSearch, but the route was never registered, so the request
fell through to the content route and returned a 404.
@sneridagh
sneridagh force-pushed the fix/querystring-search-route branch from dfd1294 to b143b03 Compare October 11, 2026 23:46
@sneridagh
sneridagh merged commit 999be70 into main Oct 11, 2026
40 checks passed
@sneridagh
sneridagh deleted the fix/querystring-search-route branch October 11, 2026 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant