This problem was mentioned in #1414778: Notice: Undefined variable: filename in include() ... views-export-xls-view-xls.tpl.php but mixed with an complete other issue. So I am cleaning up a little bit and separate the issues. This one deals with:

Notice: Undefined property: view::$row_index in views_handler_field->get_render_tokens() (Row 1256 of /home/www/web62/html/xxxx/sites/all/modules/views/handlers/views_handler_field.inc).

or this line in a newer views version.

Notice: Undefined property: view::$row_index in views_handler_field->get_render_tokens() (line 1355 of /.../modules/contrib/views/handlers/views_handler_field.inc).

The problem arises during the call to the field theme method in views_export_xls.module where the views field handle is missing the row index.

function template_preprocess_views_export_xls_view_xls(&$vars) {
.
.
...
      if (empty($field->options['exclude'])) {
        $items[$key] = strip_tags($field->theme($row));  //That's the snag!
      }

Sending a patch after I got an issue number.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

marcusx’s picture

Patch for adding row_index in theme function to avoid notices.

marcusx’s picture

Status: Active » Needs review
misterkay’s picture

I was experiencing this as well. marcusx's patch solves it in my case as well.

creaoy’s picture

Commited patch #1 1709fec

creaoy’s picture

Status: Needs review » Fixed
creaoy’s picture

Status: Fixed » Closed (fixed)