When using Views Data Export with non-scalar exposed filters (for example, a date field with between operator or a taxonomy select box), a warning is generated during export. The warning occurs even when not using the %exposed-token in a filename, and when using the token, the actual data for those complex filters is missing.

Warning: htmlspecialchars() expects parameter 1 to be string, array given in check_plain() (line 1521 of /home/ivangeer/workspace/zebweb/includes/bootstrap.inc).

Attached is a patch that attempts to resolve this by flattening arrays (seems that this is the only other type besides scalar data).

Comments

brad.bulger’s picture

i was seeing this in 6.x as well.

steven jones’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests
intervalle’s picture

The patch "views-data-export-complex-filter-token-warning.patch" doesn't work for me for a "between" (min/max) date exposed-filter

intervalle’s picture

Here's the patch with the modification which works for me with the between-date-exposed-filter

gabrielmachadosantos’s picture

Works fine here indeed. Thanks.

xspade’s picture

Status: Needs work » Needs review

Patch in #4 worked for an exposed filter, which was an multi-select entity reference. It's definitely an issue with the non-scalar (multiselect, range, etc.) exposed variable.

steven jones’s picture

Status: Needs review » Closed (duplicate)