Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
it would appear that views data export does not work with exposed filter, if the view is unfiltered a cvs file is created correctly but not when filter
any idea where to start looking
drupal 7.8 with views 3.x
tks
M
Comment | File | Size | Author |
---|---|---|---|
#25 | patch_commit_dee0d45bbaba.patch | 2.52 KB | JaceRider |
Comments
Comment #1
somes CreditAttribution: somes commentedare there any dependencies for views export, strange thing is that exposed filters work with firefox on a local system (not chrome)
when on a web server no outputs are generated only default views with no exposed filters
no errors generated - strange behavior indeed
M
Comment #2
somes CreditAttribution: somes commentedMhhh looks like you need mini-feeds selected so that exposed filters work - chrome and firefox now working
Comment #3
faheebi CreditAttribution: faheebi commentedI am having the same issue.
Somes- where do I go to select mini-feeds? I am not seeing it in Mini-feeds option anywhere in the view. Thanks for your help.
Comment #4
liupascal CreditAttribution: liupascal commentedHello,
Same issue here, the filter is not taken into account when selecting one - hence my export is empty.
My data export display is attached to a page display. (which exposes the filter widget). There is no display setting that is overridden anywhere.
Comment #5
pinkonomy CreditAttribution: pinkonomy commentedI try to export a view using an exposed filter but I always export the first page (There are 2 pages on the view).
I need to export all the view results,not only the first page.
Any suggestions?
Thanks
Comment #6
johnvIt works fine for me. Remember to set the pager settings and to inherit filters.
Comment #7
modstore CreditAttribution: modstore commentedSame issue here, though seems to work when not exporting as batch.
Comment #8
muhammadanaskhan CreditAttribution: muhammadanaskhan commentedSame issue here!! Please help!
Comment #9
johnv@muhammadanaskhan,
can you confirm if you have the problem only with 'Batch export', of also with 'direct export' ?
Comment #10
pinkonomy CreditAttribution: pinkonomy commentedI finally solved this with selecting ALL the displays the view has for the Data export.
Comment #11
muhammadanaskhan CreditAttribution: muhammadanaskhan commentedI am facing problem even if I am doing batch export. It only works if there are no exposed filters. Have extensively tested this with different url settings. Currently am using the following format of the url as recommended below the url field:
path/%/%/feed. That is, place '%' for each of the exposed filters used in the views
Comment #12
Bright Web Design CreditAttribution: Bright Web Design commentedIt doesn't work for me too. I have tried all types of configurations and other settings but nothing works for exposed filter.
It would be so great if some one could suggest some ideas to fix this issue.
Comment #13
Steven Jones CreditAttribution: Steven Jones commentedSorry guys, so you need to edit the style settings, and make sure: 'Parent sort' is checked. This will cause the exposed filters to be inherited.
You only need to edit the path to insert '%' if you are using contextual filters in the view, not exposed filters.
Comment #14
emilianodelau CreditAttribution: emilianodelau commentedI've tried this solution with the 6.x-2.0-beta6 and it is not working.
Comment #16
tbenice CreditAttribution: tbenice commentedi'm using a csv export attached to a block display. I have 'parent sort' checked in the style settings, but the filter is not inherited. Could it be that it doesn't inherit filters from a block display?
Edit- I just tried it with a page display, no dice. The exposed filter simply isn't inherited.
Comment #17
tbenice CreditAttribution: tbenice commentedThe key is to :
1) make sure that parent sort is checked in the display settings
2) have an identical exposed filter configured in the attached export display
Comment #18
kevinquillen CreditAttribution: kevinquillen commentedI have done the above in #17 and do get a CSV export now, but the resulting file doesn't always contain the correct data. I am using 'Remember last Selection' on the parent view for the fields- does that cause an issue?
For example, I get one view that looks great, and the subsequent views look like a mixture of searches.
Comment #19
kevinquillen CreditAttribution: kevinquillen commentedI have a few different filters on a custom entity view, all are basic text fields, with two List (Select) fields.
"Name" is exposed and set to 'Contains'.
"Email" is exposed and set to 'Contains'.
"Invoice #" is exposed and set to "Contains".
"Status" is exposed and set to the types they can select.
"Type" is exposed and set to the types they can select.
While the View itself correctly filters no matter what I set, the exported CSV is entirely wrong. It only seems to get it right if I use the Email field. The filters are matched on both the View and the export view. I can't figure this out at all and is seemingly random.
If I use the Name field and nothing else, it returns all the results in the system, not the one on the view itself.
Comment #20
kevinquillen CreditAttribution: kevinquillen commentedUpdate:
I had a field filter in the view twice, once exposed, and the other to filter out values that were blank (not exposed).
I removed this filter from both views, but in the parent view, the filter field name was still filter_field_name_1. I had to delete this field and add it back to get filter_field_name. Then, the view began to work. Still seems like a bug..
Comment #21
johnvIf some of you use caching for the views, that might be a cause. See #1055616: Query arguments should be replaced before generating cache ID
Comment #22
khan2ims CreditAttribution: khan2ims commentedHi,
I was also have the same problem witj 6.x version. The csv output file was not respecting the filters applied by exposed filter. After playing around, I changed one setting. Under "Data export settings", I set Batched export: No. And now the csv output file is rendering correct results!
Comment #23
kevinquillen CreditAttribution: kevinquillen commentedIts been a while, but I think it still has a problem with multiple filters that are the same. Example, an exposed filter for 'Name' but another filter for 'Name' not exposed, and defaulting it to not be 'John Smith'.
Comment #24
drupalnix CreditAttribution: drupalnix commentedI recently added the views data export module and experienced the same problem with the export dumping out all of my table values, not the filtered set.
Solution #17 Worked for me! I had everything set up identically (mostly) to my main view; the only difference was that I did not expose my filters on the data export view. Once I exposed them the csv/xls exports the filtered table view. Thanks for the tip tbenice.
This should really be part of the documentation, the two screen shots are fine but more could be provided.
Comment #25
JaceRider CreditAttribution: JaceRider commentedI was having trouble getting exposed filters to impact exported content when batch mode is chosen. It worked great without batch mode but it seems the query is lost when performing a batch.
The attached patch fixes this issue for me.
Comment #27
Albert Volkman CreditAttribution: Albert Volkman commentedThe patch over on #1871560: Exposed input not set on batch exports fixed my issue. Appears that these issues are one and the same.
Comment #28
Steven Jones CreditAttribution: Steven Jones commentedAs per #27 I'm marking this as a duplicated of #1871560: Exposed input not set on batch exports
Comment #29
charlied CreditAttribution: charlied commentedOn 7.x-3.0-beta6 I found #17 works in a situation where the main display is paged, provided you also ensure the Pager setting on the Data Export display is set to "Display all items".
Comment #30
one_hoopy_frood CreditAttribution: one_hoopy_frood commentedDistilling the wisdom from above: (into what worked for me as well)
STEP 0 :: EXPORT your view and save that to make a backup of your view you can re-import should this not work
STEP 1 :: copying your existing display
If you have a PAGE view of whatever it is you want (may work for other displays like BLOCKs) and that display is very complex, rather than adding every field from your existing display to the new display and making sure all the exposed filters are identical on both, you can export the view thusly: (if your display is simple, then you can just recreate it if you like and skip to STEP 2)
1) Add a 'dummy' DISPLAY->DATA EXPORT to your view (so you can see the parameters of the data export handler)
2) CLONE your complex PAGE display and name it accordingly
3) Export the ENTIRE VIEW into a text editor
4) Search for the string '/* Display:' and ... :
COPY the important bits of the DATA EXPORT HANDLER parameter from your exported view:
to your existing display handler:
To create:
NOTE: depending on how many views_data_export pages you have, you may have to change the value of 'views_data_export_1' above to something larger. If you use the same number as the DUMMY display you delete, you'll be fine.
then DELETE the display part of the view that is the dummy DATA EXPORT DISPLAY
STEP 2 :: Telling the newly minted DATA EXPORT DISPLAY to pay attention to the exposed filters
(FROM 17)
1) make sure that parent sort is checked in the display settings
2) have identical filters configured in your export display (you will if you did STEP 1)
3) attach the EXPORT display to your QUERY display.
STEP 3 :: Profit.
Comment #31
rohittiwarirvt CreditAttribution: rohittiwarirvt commentedWell Done buddies we have succesfully used your method of changing the handler for the cloned page and the csv works fine for exposed filter which is date in out case, the exposed filter works fine.thanks very much.
Comment #32
danielphenry CreditAttribution: danielphenry commentedConfirm selecting "parent sort" does cause exposed filter to be set correctly. As mentioned in Comment #17
Comment #33
Countzero CreditAttribution: Countzero commented#30 works beautifuly. Thanks for this.
Comment #34
fgjohnson@lojoh.ca CreditAttribution: fgjohnson@lojoh.ca commentedNot very useful, nor easily supportable, if #13 is the only solution.
Will this bug be resolved in versions beyond 7.x-3.x-dev?
Comment #35
allenthehusband CreditAttribution: allenthehusband commentedTo add to comment 17:
The Filter Identifier on your exposed filter in your data export view must also match the Filter Identifier of the original view. The Filter Identifier field is down in the "More" section below all of the exposed filter settings. I had Parent Sort checked and matched the Exposed Filter settings, but it still wasn't working. Then I matched the Filter Identifier and the export now honors the Exposed Filter when exporting. Hope this helps.
Comment #36
Danny EnglanderThe method in #30 above works fine for me, however, it did not work initially when I had the patch from #2261167: Option for non-image link display applied. Simply removing the patch from over there fixed this straight away.
Comment #39
Steven Jones CreditAttribution: Steven Jones commentedExposed filters do work, even in batch mode, as per #28 I'm marking a duplicate.
Comment #40
mooru CreditAttribution: mooru commentedI have a date field exposed filter in my view and also my xls data export view but when i filter by a date in th exposed filter, the xls file downloaded contain all records not the ones i want. Does views data export work with date field, exposed filters?
Comment #41
webexpertjsh CreditAttribution: webexpertjsh commentedI have a csv view that are giving correct csv with date filer when I used "is equal" operator.. But i need to use "is between" operator for fatching data of two dates so I am using this. But after using this,, I am not getting correct csv,, its not giving me filtered csv..
Please help :(
Comment #42
royerd CreditAttribution: royerd commentedI thought I had them the same and then carefully read #35 and realized I didn't.
Comment #43
uceap-web CreditAttribution: uceap-web commented#17 & #35 solved problem for us:
1) make sure that parent sort is checked in the display settings
2) have an identical exposed filter configured in the attached export display
3) the Filter Identifier on your exposed filter in your data export view must match the Filter Identifier of the original view.
Comment #44
superelectron CreditAttribution: superelectron as a volunteer commentedHello,
I have an exposed filter and the csv download isn't working. The csv export does export ALL data but it DOES NOT apply the exposed filter.
Checklist of things checked:
1) make sure that parent sort is checked in the display settings
2) have an identical exposed filter configured in the attached export display
3) the Filter Identifier on your exposed filter in your data export view must match the Filter Identifier of the original view.
4) on "data export" tab of view, ensure /path/to/view/csv is set in "Data export settings -> path"
Filters:
Time Placed (Exposed Popup Day) is the filter I am using, and it causes the problem. If I remove it, then the functionality of the csv export does NOT change. This means that the view changes according to the exposed filter but the export includes ALL data. When removing the exposed filter, the exact same csv export is downloaded.
Anything helps!
Comment #45
Kris77 CreditAttribution: Kris77 commentedI have problem only with 'Batch export', with 'direct export' all works fine.
In Batch Export, only the first two pages are exported.
Comment #46
Marco Aurelio Rocca CreditAttribution: Marco Aurelio Rocca commentedFacing same issue right now. Any help?
Comment #47
lubwn CreditAttribution: lubwn commentedI had the same problem. Deleting the Views Data Export view and re-creating it solved the problem for me. I have probably clicked on some custom sort at any point or something and broke it. So recreating and not touching it (apart from changing the pagination settings) does the trick.