Steps to reproduce: Created a table view with the node title and a user reference field visible. Added an exposed filter for the user reference field. When I select a user to filter the list and then click CSV, the exported CSV file is empty. Reason: the link URL of the CSV button shows ...&filter0=array.... So we need to handle filters that specify the values as arrays (which is often the case). Attached patch fixes the issue.

Setting to critical as this bug makes export of views with exposed filters unusable in many situations.

Comments

alpritt’s picture

Status: Needs review » Reviewed & tested by the community

heh, I just wrote the exact same patch in response to http://drupal.org/node/175116. That'll teach me to check the issue queue properly. Marked the other issue as duplicate since this one has the patch attached.

Works as advertised.

zoo33’s picture

Great, but is that the same problem though? That issue talks about getting all records in the results while my problem was getting an empty result...

alpritt’s picture

The fix for that issue caused the bug you describe above, so the issue was re-opened (http://drupal.org/node/175116#comment-866716). So yes, same problem.

heydere’s picture

Status: Reviewed & tested by the community » Active

Thanks for the fix. I just found the same problem with my testing. I just found and tested an alternate solution - replace the entire if statement with this call:

$url_filter = drupal_query_string_encode($view->used_filters);

This is what is used in the views_rss module, and I think we'd want to use library functions that are already available rather than re-building the same functionality.

I'm going to re-set the status to active to get more feedback before it gets committed.

zoo33’s picture

Status: Active » Needs review
StatusFileSize
new651 bytes

Cool! That's definitely better if the result is the same.
Attaching a new patch. Seems to work.

adellefrank’s picture

Could someone commit this patch to the latest release, please? Thanks!

zoo33’s picture

The usual procedure is that members of the community review/test a patch before it gets committed. If you can, apply the patch to your local copy and make sure everything is working. Then return here and change the status to reviewed and tested by the community.

adellefrank’s picture

Status: Needs review » Reviewed & tested by the community

I tried this out on my site and it worked great! The only filter it hasn't worked for is my timestamp (not the system timestamp, but one set by the user in a date cck field). But I've been having multiple problems with the select style date field in cck, and I don't think this module has anything to do with those problems.

emdalton’s picture

Never mind, I had the wrong version of the module. (I had reported a patch error.) Fixed now.

The patch still doesn't seem to be fixing my problem, however. I think it has something to do with the fact that I can't get views_bonus_export module permissions to stick, so only admin can use the export. It works fine for admin, but not for anyone else. Everyone else just gets a blank page with the title of the view on it.

hakkisak’s picture

Just Added this patch, works fantastic!

appel’s picture

Works here too, thanks!

oryx’s picture

Worked perfectly for me too, thx for the patch!

neclimdul’s picture

Status: Reviewed & tested by the community » Fixed

committed modified version of this patch the deals with the empty filter case.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

N4R4YAN’s picture

Is this patch working also for the views bonus pack stable version (1.1) for D6?
if not, and this is likely, is there one out there? :)

Edit: wow i didn't see the date of the last post. tho i bumped an old thread, still i can't find an answer for D6 users about this issue. Guess i am going to open a new one.