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.
Comment | File | Size | Author |
---|---|---|---|
#1 | views_export_xls-undefinend_property_fix-1701220-1.patch | 443 bytes | marcusx |
Comments
Comment #1
marcusx CreditAttribution: marcusx commentedPatch for adding row_index in theme function to avoid notices.
Comment #2
marcusx CreditAttribution: marcusx commentedComment #3
misterkay CreditAttribution: misterkay commentedI was experiencing this as well. marcusx's patch solves it in my case as well.
Comment #4
creaoy CreditAttribution: creaoy commentedCommited patch #1 1709fec
Comment #5
creaoy CreditAttribution: creaoy commentedComment #6
creaoy CreditAttribution: creaoy commented