Skip to content

BUGFIX: Reject suggestions without a context node - #82

Open
rolandschuetz wants to merge 1 commit into
Flowpack:5.3from
rolandschuetz:bugfix-kapsch-backend-t-missing-search-context
Open

BUGFIX: Reject suggestions without a context node#82
rolandschuetz wants to merge 1 commit into
Flowpack:5.3from
rolandschuetz:bugfix-kapsch-backend-t-missing-search-context

Conversation

@rolandschuetz

@rolandschuetz rolandschuetz commented Sep 7, 2026

Copy link
Copy Markdown

🤖 This PR was generated with ChatGPT Astra on behalf of Roland.

Requests to /flowpack/searchplugin with an omitted or empty contextNodeIdentifier currently use the empty string to look up a live node and throw an unhandled exception. Return HTTP 400 with the existing JSON result shape and an explicit input error before looking at the query cache, content repository, or Elasticsearch.

This targets the 5.3 maintenance branch, matching version 5.3.4. Nonempty identifiers keep their existing behavior, including errors for references to nodes that cannot be found.

What was done:

  • The bug was reproduced: missing or empty identifiers caused HTTP 500 before the fix and return HTTP 400 afterward.
  • Normal requests still work: valid English/German requests return identical results before and after, including correct site filtering.
  • Tests passed: 7 focused regression tests and 122 existing website unit tests.
  • Scope is intentional: nonexistent, nonempty identifiers retain their existing error behavior.

Tests cover simulated cache hits. Actual cache reuse was not verified because of a pre-existing cache-key mismatch, which this PR leaves unchanged.

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