CSV export not respecting certain exposed filters
| Project: | Views Bonus Pack |
| Version: | 6.x-1.0-beta2 |
| Component: | Views Export |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Hey there, I found that with some filters the export to CSV feature did not work, as it seems that some filters are really not respected. For example using those filters, my view should have only a couple of lines (less than 10) and in the export I find that that view actually has all the lines unfiltered. (more than 100).
I tried to test filter by filter and I think I found the problem.
First : here is the url for a query that works when exporting in csv : I have the same results in the csv than on the site :
http://intranet.blogsurfr.com/contacts/mailing?field_tel_value=&title=&field_membre_comite_apres_value_many_to_one=All&field_statut_membre_value_many_to_one_op=or&field_statut_membre_value_many_to_one=Membre&postal_code=&field_membre_depuis_value_op=%3D&field_membre_depuis_value[value]=&field_membre_depuis_value[min]=&field_membre_depuis_value[max]=&field_payee_05_value_many_to_one_op=or&field_payee_05_value_many_to_one=All&field_payee_06_value_many_to_one_op=or&field_payee_06_value_many_to_one=All&field_payee_07_value_many_to_one_op=or&field_payee_07_value_many_to_one=All&field_payee_08_value_many_to_one_op=or&field_payee_08_value_many_to_one=All&field_payee_09_value_many_to_one_op=or&field_payee_09_value_many_to_one=All&tid_op=or&tid=All&subject_op=contains&subject=&title_1=As you can see, only the "field_statut_membre_value_many_to_one=Membre" has an actual filter. This exports to excel without any problem.
However, if I choose another filter for example :
http://intranet.blogsurfr.com/contacts/mailing?field_tel_value=&title=&field_membre_comite_apres_value_many_to_one=All&field_statut_membre_value_many_to_one_op=or&field_statut_membre_value_many_to_one=All&postal_code=&field_membre_depuis_value_op=%3D&field_membre_depuis_value[value]=&field_membre_depuis_value[min]=&field_membre_depuis_value[max]=&field_payee_05_value_many_to_one_op=or&field_payee_05_value_many_to_one=All&field_payee_06_value_many_to_one_op=or&field_payee_06_value_many_to_one=All&field_payee_07_value_many_to_one_op=or&field_payee_07_value_many_to_one=All&field_payee_08_value_many_to_one_op=or&field_payee_08_value_many_to_one=All&field_payee_09_value_many_to_one_op=or&field_payee_09_value_many_to_one=Oui&tid_op=or&tid=All&subject_op=contains&subject=&title_1=In this example I filter only for this : "field_payee_09_value_many_to_one_op=or&field_payee_09_value_many_to_one=Oui"
This returns only three nodes, but if I export to csv, I get all results possible, like no filters where applied at all.
Also, If I do this :
http://intranet.blogsurfr.com/contacts/mailing?field_tel_value=&title=&field_membre_comite_apres_value_many_to_one=All&field_statut_membre_value_many_to_one_op=or&field_statut_membre_value_many_to_one=Membre&postal_code=&field_membre_depuis_value_op=%3D&field_membre_depuis_value[value]=&field_membre_depuis_value[min]=&field_membre_depuis_value[max]=&field_payee_05_value_many_to_one_op=or&field_payee_05_value_many_to_one=All&field_payee_06_value_many_to_one_op=or&field_payee_06_value_many_to_one=All&field_payee_07_value_many_to_one_op=or&field_payee_07_value_many_to_one=All&field_payee_08_value_many_to_one_op=or&field_payee_08_value_many_to_one=All&field_payee_09_value_many_to_one_op=or&field_payee_09_value_many_to_one=Oui&tid_op=or&tid=All&subject_op=contains&subject=&title_1=Applying filters "field_membre_comite_apres_value_many_to_one=All&field_statut_membre_value_many_to_one_op=or&field_statut_membre_value_many_to_one=Membre" AND "field_payee_09_value_many_to_one_op=or&field_payee_09_value_many_to_one=Oui"
Then only the first filter "field_membre_comite_apres_value_many_to_one=All&field_statut_membre_value_many_to_one_op=or&field_statut_membre_value_many_to_one=Membre" gets actually applied in the CSV export, but not the second one.
So the problem seems to be with this filter and it's structure ? "field_payee_09_value_many_to_one_op=or&field_payee_09_value_many_to_one=Oui"
I'm really confused here, because using the exact same filter on another view, simply works.
I used this query on another view :
http://intranet.blogsurfr.com/organisation/suivi?field_statut_membre_value_many_to_one=All&field_membre_depuis_value_op=%3C%3D&field_membre_depuis_value[value]=&field_membre_depuis_value[min]=&field_membre_depuis_value[max]=&field_payee_05_value_many_to_one_op=or&field_payee_05_value_many_to_one=All&field_payee_06_value_many_to_one_op=or&field_payee_06_value_many_to_one=All&field_payee_07_value_many_to_one_op=or&field_payee_07_value_many_to_one=All&field_payee_08_value_many_to_one_op=or&field_payee_08_value_many_to_one=All&field_payee_09_value_many_to_one_op=or&field_payee_09_value_many_to_one=Oui&field_etapes_validation_value_many_to_one=All&tid=AllAs you can see I used the same filter "field_payee_09_value_many_to_one_op=or&field_payee_09_value_many_to_one=Oui"
And in this case, I can export to CSV without any issues...So it seems the problem is not that specific filter, but a certain combination of filters..??
I was wondering if by looking at these queries, anyone out there could notice somethign weird, or maybe a known issue with a certain type of filters??
Thanks a lot for any tips, help, etc.
Patchak

#1
I really have issues with this module. I have created another view with some filters already pre selected. My view comes out with 117 resutls because of that pre selected (non exposed) filter.
When I export the csv of that view, I get more than 1000 results, as that specific filter is not applied at all.
I don't really know where to look to fix this, any help possible at least some tips for places to look at??
Patchak
#2
Hummm I actually found the problem here.
This module seems to have issues if the "Default" and "Page" views are not identical. I had some filters that were only on the "Page" display, but not on the default one, and those were the filters that were failing.
I've enabled all the filters on the default mode and rebuilt my "feed" and "page" displays and now everything works fine!!
Patchak
#3
Automatically closed -- issue fixed for 2 weeks with no activity.
#4
Patchak,
I'm still having this issue, my default page has the same filters, and the export still does not honor the exposed filters.
#5
I've run into a similar issue.
I'm using Faceted Search with Views, and the Search is done as a filter. I'd like to allow users to export the search results as a CSV file, but, as things stand, the result is a CSV containing the entire view.
I found fixes for Drupal 5.x for similar, if not identical, issues, but I haven't been able to locate anything regarding Drupal 6.x yet.
#6
Oops. After fiddling around with Views a bit more, it turns out my problem is the Faceted Search module. I'm not exactly sure how it's filtering results - I'd just assume it was working off of the Search Terms filter. Any advice would be great, but I'm off to dig through the Faceted Search documentation to figure out if I can put a hotfix together for this.