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?
Comments
Comment#1
MsG CreditAttribution: MsG commentedLog in or register to post comments
Comment#2
MsG CreditAttribution: MsG commentedLog in or register to post comments
Comment#3
MsG CreditAttribution: MsG commentedLog in or register to post comments
Comment#4
MsG CreditAttribution: MsG commentedLog in or register to post comments
Comment#5
marcusx CreditAttribution: marcusx commentedThis 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...
Log in or register to post comments
Comment#6
marcusx CreditAttribution: marcusx commented@MsG:
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
Log in or register to post comments
Comment#7
esmitex CreditAttribution: esmitex commentedI had the same issue, the patch fixed it. Thanks.
Log in or register to post comments
Comment#8
marcusx CreditAttribution: marcusx commented@Msg & @esmitex
If you have reviewed this and it is working ok, maybe you can set this to RTBC so we get this committed.
Log in or register to post comments
Comment#9
esmitex CreditAttribution: esmitex commentedLog in or register to post comments
Comment#10
bendev CreditAttribution: bendev commentedalso tested this patch and works ok.
Log in or register to post comments
Comment#11
weri CreditAttribution: weri at Previon Plus AG commentedPatch works as expected. Would be great to have it in the next release.
Log in or register to post comments
Comment#12
nickgs CreditAttribution: nickgs commentedSame results here, patch works as expected.
Thanks!
Log in or register to post comments
Comment#13
ItangSanjana CreditAttribution: ItangSanjana commented#5 fix the issue thanks!
来自 https://www.drupal.org/project/views_export_xls/issues/2344865