Fix event filtering on tags#174
Merged
edalzell merged 3 commits intoJul 16, 2026
Merged
Conversation
edalzell
deleted the
173-upcoming-events-tag-not-accepting-event-id-after-upgrade-to-6
branch
July 16, 2026 03:51
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.
Problem
The
eventparameter on the events tags (between,upcoming,today,in,calendar) is ignored. Passingevent="some-id"returns all occurrences in the collection instead of only the occurrences for that single entry.Fixes #173.
Reason
In the v6 refactor (#168),
Events::entries()was rewritten to delegate to a newEntriesquery class that only filters by collection:The previous implementation branched on the
eventid to filterwhere('id', $id). That branch was dropped — the generator still stores the id in$this->event, but the field became dead code and is never read by the query. So every tag routed throughEntriesreturns the whole collection regardless ofevent.Solution
src/Entries.phpusing a two-branchwhen()soeventandcollectionare mutually exclusive, witheventtaking precedence — matching the v5 behavior.Eventsgenerator constructor now throws if bothcollectionandeventare passed. The check runs on the raw params beforecollectiongets its'events'default applied, so it reflects true user intent. This does not affectevents:download_link, which legitimately accepts both.eventnow returns 4 occurrences, not 5 when an unrelated entry exists in the collection) and cover the new exception.collectionandeventare mutually exclusive across the query tags.