Hi,

Using Drupal 7.26 on RedHat Server.

I've a view using sheetnode for displaying results.
It works but the Excel icon at the botton of the page doesn't appear and the following message is displayed:
Undefined property: view::$feed_icon in sheetnode_plugin_style->attach_to() (line 528 of /var/www/drupal-7.26/sites/all/modules/sheetnode/views/sheetnode_plugin_style.inc).

The same view on Windows (Drupal 7.23) display the icon without any problem.

The directory "/var/www/drupal-7.26/sites/all/modules/sheetnode/modules/sheetnode_phpexcel/images" contains 5 png files (xlsx.png, xls.png and so on).

Thank's for your help.

Fred

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

infojunkie’s picture

Is there a difference in Views version?

You can make sure the image is being correctly generated by turning on devel module and modifying sheetnode_plugin_style.inc at line 528:

$image = theme('image', array('path' => $this->feed_image));
dsm($image); // ADD THIS
$this->view->feed_icon .= l($image, $this->view->get_url(NULL, $path), $url_options);

What do you see?

ftrebuchet’s picture

Hi Karim,

Thanks for your help.
I'll try this next monday (no access to the server before).
I've already add some debug arround line 528 and don't seen anything, but I'll try again.

I'll tell you.

Fred

ftrebuchet’s picture

FileSize
45.91 KB

Hi,

Here is what I see using dsm($image):
"img typeof="foaf:Image" src="xxx.xxx.xxx.xxx/drupal-7.26/sites/all/modules/sheetnode/modules/sheetnode_phpexcel/images/xlsx.png" alt="">"

If I copy/past the URL to my browser, it displays the icon.
If I go to "sites/all/modules/sheetnode/modules/sheetnode_phpexcel/images/", ls -l tells me rw for owner, r for group and r for others.

If I add "dpm($this)" at line 529, I can see that view object doesn't contain "feed_icon" property on version 7.26 (it does on version 7.23). Instead, it contains a property called "language" (that doesn't exists on version 7.23) and that contains the same thing that version 7.23's feed_icon property.

Strange!

Attached a screen capture showing dpm result of version 7.26
view-7.26

Any idea?

Thanks
Fred

ftrebuchet’s picture

Hi,

Here is an ugly patch.
Replace:
$this->view->feed_icon .= l($image, $this->view->get_url(NULL, $path), $url_options);

by this:
<$this->view->feed_icon = l($image, $this->view->get_url(NULL, $path), $url_options);/code>

notice "." instead of ".="
and it works!
don't ask me why, but I'm interested by the answer.

Fred

johnrosswvsu’s picture

Status: Active » Needs review
FileSize
570 bytes

For patch purposes.

willhallonline’s picture

Assigned: Unassigned » willhallonline

I will try to look at this in the next couple of weeks. Thanks for making the patch.