Repository navigation
Events: only read the event filters from a filtered URL - #2212
Merged
Merged
Conversation
A filtered URL like `/upcoming-events/filtered/format/online/` was parsed for any `key/value` pair, and every key was set as a query var on the main request. Only the four event filters belong there: type, format, month and country. Other keys are now dropped when the path is read, and the query vars are set from a fixed map of filter to query var, so nothing outside it can reach the main query either way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
raicem
marked this pull request as ready for review
October 20, 2026 07:40
The four event filters were spelled out by hand in four places. Registering the query vars, reading the plain query-string form, and carrying the other filters through the form now all read from `FACET_QUERY_VARS`, so adding a filter is one edit. Setting the query vars from a filtered URL now loops over the map instead of the parsed facets, which is just as strict and still leaves `search` out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bor0
approved these changes
Oct 20, 2026
bor0
left a comment
Member
There was a problem hiding this comment.
Tested locally. Filters still work through the UI and pretty URLs, keys outside the four filters are ignored, and the new tests fail when the guards are reverted. Thanks!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/upcoming-events/filtered/...) now only read the four event filters: type, format, month and country. Any other key in the path is ignored.Test plan
events-query.phpare already onproduction.🤖 Generated with Claude Code