I have a view of commerce orders where the admin can limit by min and max dates. That view is using the export as csv display and I'm getting the following error during export.

Notice: Array to string conversion in views_data_export_plugin_style_export->generate_filename() (line 348 of /Users/jonathanhenson/Sites/NO1 Sites/NO1003 - Meadow Creature/sites/sites/all/modules/views_data_export/plugins/views_data_export_plugin_style_export.inc). Backtrace:
implode('--', Array) views_data_export_plugin_style_export.inc:348

I did a little digging and it looks like its due to the fact that the date range exposed filter is an array of arrays not strings. So I added a loop that flattens those first, then passes them along to get flattened again.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jlockhart’s picture

czigor’s picture

Status: Active » Needs review

Patch works for me, thanks!

sepehr.sadatifar’s picture

patch works for me too.
the end result of '%exposed' token value is some thing like 'date_filter_09/01/2014--09/11/2014' which I think is what we expect.
tnx

sch2’s picture

Patch worked for me, thanks alot.

mooru’s picture

Patch didn't work for me. Still can't export files when i use exposed filters with date values

keopx’s picture

Status: Needs review » Reviewed & tested by the community

Patch applied correctly.

Works for me.

plopesc’s picture

Works for me too

joelpittet’s picture

RTBC++

Steven Jones’s picture

Status: Reviewed & tested by the community » Fixed

Fixed, thanks!

  • Steven Jones committed f0a00c8 on 7.x-3.x authored by jhenson
    Issue #2332489 by jhenson: Array to String error when exporting date...

Status: Fixed » Closed (fixed)

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

gabrielZ’s picture

Thanks for sharing. Worked for me.