Download & Extend

Views PHP fields not calculated

Project:Views data export
Version:7.x-3.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Not sure if this is an issue for here or elsewhere. We're using Views PHP to calculate some fields inc a view, which then we try to export through Views Data Export.

The PHP calculated fields show up fine in the export preview on the views page, but are empty in the actual download.

If we don't batch the creation of the file, then they display fine.

Comments

#1

i have the same problem. it's only work when i remove batch creation. Any help?

#2

I'm experiencing the same issue: PHP filter is not working using batched export.
However I haven't tried this on version 7.x-3.0-beta6 yet.

#3

Version:7.x-3.0-beta5» 7.x-3.0-beta6

I'm seeing the same problem. Shown in the Views preview but does not appear in the actual download.

Views Bonus Pack 6.x-1.1 works as expected.
Views data export 6.x-2.0-beta6 does not work.

Using Views PHP 6.x-1.x-dev (2011-Jun-22)

Wish I know if this was Views PHP or Views data export.

#4

Having same problem.

#5

#6

Version:7.x-3.0-beta6» 7.x-3.x-dev

I can reproduce this under the dev version of this module and the dev version of Views PHP and the dev version of Views.

If I turn off the batch support in views for this display, the fields will export.

#7

Don't know if this is helpful, but I took a view with a "Views PHP" field that wasn't exporting, ran it through views_get_view_result() to get an array of the results. When I ran it through print_r(), I saw something interesting. This is one good field and one "Views PHP" field:

            [good_field] => 1412888735
            [views_php_field] => Array
                (
                    [10-9-2014] => 10-9-2014
                )

The results from the Views PHP field is an array rather than a string. Could this be the problem? Maybe if the results are a single element array, just use the value of the element?

If I knew where in the Views data export code to look, I'd fix it.