CSV shows all records when a filter is applied.

Created on 17 July 2024, 7 months ago
Updated 26 August 2024, 6 months ago

Problem/Motivation

The D10.2 site is selling selling tickets for events through a combination of Commerce, Commerce Registration and Entity Registration modules. The views in use display as a table the data of individuals who have registered for an event. Some of these data is stored in fields of the individual registrations through the Entity Registration module, other data come from the general Commerce sales data, all subsumed under a single Entity-ID. CSV export is needed for further processing of participants' data. Filtering narrows down all historic and current registrations to those from a single event by using the event's, i. e. the Commerce product’s node‘s Entity-ID.

- When "Expose this filter to visitors, to allow them to change it" remains unchecked, filtering with a fixed event Entity-ID works as expected on Page and on the Data Export page, and the CSV file contains the filtered set.
- When the filter is exposed and can be changed for the creation of lists for different events it does work on the views Page, but the filter doesn't carry over to the Data Export page and the CSV export. The resulting CSV is not filtered, containing all registrations from all Entity-IDs (=products/events), or, with an initial preset Entity-ID, invariably exports the data of the preset event even when the preset product Entity-ID is being replaced by another number that then shows the correct filter result on Page. And yes, a very simple test view and export combo with just two displayed fields „name“ and „email address“ and a single filter „Entity-ID“ has the same behavior.

I read on some webpage that in Drupal 6 or 7 there was a checkbox „use filters from parent page“ for Data Export - has this choice been hard coded into D8 and later, and is it therefore just not functioning?

Steps to reproduce

Have Commerce installed on a D10.2 site, Commerce Registration and Entity Registration. Create two products = events with just 1 product variation each and no product attributes. Register some user or as admin for both events. Create a view of the existing registrations with a field or two to display and one filter for the event's = product's node's Entity-ID. Expose the filter to allow changing the ID. Create the Data Export for CSV. Apply one event's Entity-ID as a filter, and the behavior described above would occur, showing registrations for both events or the preset's registrant(s).

Note: perhaps this would be a problem with other types of entities as well. I am not sure the whole Commerce/Event Registration setup is necessary to reproduce the behavior. I see other bugs in the list that have to do with filtering, perhaps my description already gives a hint which other problem that has already been identified kicks in here.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.4

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024