I get the following error on my view where I want to have the Excel export icon.

Notice: Undefined property: view::$feed_icon in views_export_xls_plugin_style_xls->attach_to() (rule 43 of E:\Users\Mathijs Groothuis\Mijn websites\NSG-Drupal\sites\all\modules\views_export_xls\views\views_export_xls_plugin_style_xls.inc).

I already reinstalled the module, but still an error.

After I looked more closely on rule 43 in file views_export_xls_plugin_style_xls.inc I saw:

function attach_to($display_id, $path, $title) {

    $url_options = array('html' => TRUE);
    $input = $this->view->get_exposed_input();
    if ($input) {
      $url_options['query'] = $input;
    }
    $variables = array(
      'path' => $this->feed_image,
      'alt' => 'Icon for xls export',
      'title' => 'Export to xls',
      );
    $image = theme('image', $variables);
    $this->view->feed_icon .= l($image, $this->view->get_url(NULL, $path), $url_options);
  }

When I remove the dot in this rule:

$this->view->feed_icon .= l($image, $this->view->get_url(NULL, $path), $url_options);

It is working again. Is there a reason for the dot to be there?

Members fund testing for the Drupal project.Drupal AssociationLearn more

Comments

MsG’s picture

Issue summary:View changes
MsG’s picture

Issue summary:View changes
MsG’s picture

Issue summary:View changes
MsG’s picture

Issue summary:View changes
marcusx’s picture

Status:Active» Needs review
FileSize
594 bytes

This is due to the changed behavior off php 5.5. See #2163443: Undefined property: view::$feed_icon in views_data_export_plugin_style_export->attach_to() there the same problem appeared.

Here is a patch that fixes this in the same way like above - see:
http://cgit.drupalcode.org/views_data_export/commit/?id=6090a21a25414d9d...

marcusx’s picture

@MsG:

It is working again. Is there a reason for the dot to be there?

Yes the dot means that the feed icon is added to already existing icons. If you remove it and your view has several feed icons you will throw away the other ones.

See:
http://php.net/manual/en/language.operators.string.php

esmitex’s picture

I had the same issue, the patch fixed it. Thanks.

marcusx’s picture

@Msg & @esmitex

If you have reviewed this and it is working ok, maybe you can set this to RTBC so we get this committed.

esmitex’s picture

Status:Needs review» Reviewed & tested by the community
bendev’s picture

also tested this patch and works ok.

weri’s picture

Patch works as expected. Would be great to have it in the next release.

nickgs’s picture

Same results here, patch works as expected.

Thanks!

ItangSanjana’s picture