Problem/Motivation
When adding the Registration Availability exposed filter to a view of event instances, selecting an option from the dropdown does not return the correct set of results.
Steps to reproduce
Create two events with registration enabled and registration spaces set to 1. For one of the events, create a registrant so that the capacity of 1 registration is reached. So, one event has no availability and one does.
Create a view of event instances and add an exposed filter for Registration Availability. The view will have a dropdown with options "Spaces available" and "Event full." Choosing either option will result in an empty view with no results.
Proposed resolution
Debugging the problem, it seems that in the EventInstanceRegistrationAvailability filter, when the $view is cloned to build the new subset of results, caching of the inital view results interferes with returning a correct set of results.
You can test this by setting your event instance view to Caching: None via its settings. When this is done, the view starts to return the correct results based on the Registration Availability filter.
A fix could then be to stop the cloned view from using the cached results of the initial view inside the query method of EventInstanceRegistrationAvailability
Issue fork recurring_events-3581083
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
chrisla commentedMR provides a fix by disabling caching of the cloned view during the query method