works fine but im getting a lot of error messages

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).

(50 times an then)

Notice: Undefined variable: filename in include() (Row 17 of /home/www/web62/html/xxxx/sites/all/modules/views_export_xls/views-export-xls-view-xls.tpl.php).

I'm using a view with relationsships "Download history: User" and "Download history: File" (Download Count Module)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

laraz’s picture

subscribe.

ZuluWarrior’s picture

You can get rid of the Undefined variable error by modifying the file views-export-xls-view-xls.tpl.php. Its just poor coding in the template file, so you could override with the theme system, or (yee-haw) just modify the file in the modules directory:

Line 17, replace
if (!$filename) {
with
if (!empty($filename)) {

ZuluWarrior’s picture

The other error, Undefined Property, is actually an error in views - fields, its discussed here:

http://drupal.org/node/1115222

and this very simple patch offered in the thread (#10) fixes the error, as usual, USE WITH CARE, we never recommend modifying Drupal or core modules code, but it does fix it for me and the nature of the fix is fairly safe (if theres no row index don't try and perform an action that causes the error)

Patch: http://drupal.org/files/issues/views_openlayers_render_tokens.patch

Anyways, hope this helps someone :)

marcusx’s picture

I created a patch for the fix in #2 as I needed it for documentation reasons in a current project.

marcusx’s picture

Title: Undefined property / Undefined variable » Notice: Undefined variable: filename in include() ... views-export-xls-view-xls.tpl.php
Status: Active » Needs review

Cleaning up a little bit and separating the two issues in this ticket.

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).

Is now #1701220: Notice: Undefined property: view::$row_index in views_handler_field->get_render_tokens().

Changing the title of this one to describe the problem with the missing filename. This should also make it easier to find.

misterkay’s picture

I was looking at this as well and I want to suggest a small difference. Instead of checking just empty() use !isset() first incase that variable is never defined to begin with and then check for it being empty. This should short circuit out on the !isset().

creaoy’s picture

Status: Needs review » Fixed

Commited patch #6 e847293

creaoy’s picture

Status: Fixed » Closed (fixed)