Get this message on the page with my nivoslider. Slider was working great until I upgraded drupal 7.0->7.2 and views 7.x-3.x-dev ->7.x-3.0-rc1. Messages remain when returning to views 7.x-3.x-dev.

Notice: Undefined property: stdClass::$field_data_field_image_node_values in template_preprocess_views_nivo_slider_view_nivo_sliderfields() (line 123 of /home/cheaphea/public_html/meridian/sites/sitename.com/modules/views_nivo_slider/views_nivo_slider.module).

Notice: Undefined property: stdClass::$field_data_field_image_node_values in template_preprocess_views_nivo_slider_view_nivo_sliderfields() (line 123 of /home/cheaphea/public_html/meridian/sites/sitename.com/modules/views_nivo_slider/views_nivo_slider.module).


Notice: Undefined property: stdClass::$field_data_field_image_node_values in template_preprocess_views_nivo_slider_view_nivo_sliderfields() (line 123 of /home/cheaphea/public_html/meridian/sites/sitename.com/modules/views_nivo_slider/views_nivo_slider.module).

Please let me know if there's something else I should attempt or post - and I apologize for whatever else as I am new.

Comments

dimrezh’s picture

The following code fix worked for me (although I'm not sure that it is a correct way to do).

Locate the fragment of code (lines 122 and 123) in views_nivo_slider.module file:

$field_image_name = "field_data_{$options['image_field']}_node_values";
$image_url = $field_output = $row->{$field_image_name}[0]['uri'];

And change to:

$field_image_name = "field_{$options['image_field']}";
$image_url = $field_output = $row->{$field_image_name}[0]['raw']['uri'];
jeremyvanlanda’s picture

Status: Active » Closed (fixed)

That worked perfectly, thank you!

Setting to closed (fixed), but if someone who knows what they're doing wants to patch this feel free.

ron williams’s picture

Status: Closed (fixed) » Reviewed & tested by the community

Marked #1149264: Final stage of slider set-up...error message as duplicate. This should remain open until it is added to the module.

asauterChicago’s picture

I applied the following code above and this does not fix the issue for me. I still get the same error.

asauterChicago’s picture

Just to be clear I changed lines 123 and 124 in the template file from:

$field_image_name = "field_data_{$options['image_field']}_node_values";
$image_url = $field_output = $row->{$field_image_name}[0]['uri']; 

to the above code:

$field_image_name = "field_{$options['image_field']}";
$image_url = $field_output = $row->{$field_image_name}[0]['raw']['uri']; 

And I still get the error:

Notice: Undefined property: stdClass::$field_field_slider_image in template_preprocess_views_nivo_slider_view_nivo_sliderfields() (line 123 of /Users/julesandjaid/Sites/adsnet/modules/views_nivo_slider/views_nivo_slider.module).
Notice: Undefined property: stdClass::$field_field_slider_image in template_preprocess_views_nivo_slider_view_nivo_sliderfields() (line 123 of /Users/julesandjaid/Sites/adsnet/modules/views_nivo_slider/views_nivo_slider.module).
Notice: Undefined property: stdClass::$field_field_slider_image in template_preprocess_views_nivo_slider_view_nivo_sliderfields() (line 123 of /Users/julesandjaid/Sites/adsnet/modules/views_nivo_slider/views_nivo_slider.module).
Notice: Undefined property: stdClass::$field_field_slider_image in template_preprocess_views_nivo_slider_view_nivo_sliderfields() (line 123 of /Users/julesandjaid/Sites/adsnet/modules/views_nivo_slider/views_nivo_slider.module).
Notice: Undefined property: stdClass::$field_field_slider_image in template_preprocess_views_nivo_slider_view_nivo_sliderfields() (line 123 of /Users/julesandjaid/Sites/adsnet/modules/views_nivo_slider/views_nivo_slider.module).
Notice: Undefined property: stdClass::$field_field_slider_image in template_preprocess_views_nivo_slider_view_nivo_sliderfields() (line 123 of /Users/julesandjaid/Sites/adsnet/modules/views_nivo_slider/views_nivo_slider.module).

ckng’s picture

StatusFileSize
new1.68 KB

Patch from #1 attached

ckng’s picture

StatusFileSize
new694 bytes

Accidentally included some whitespace changes in patch #6.
Here's a new one.

ckng’s picture

Status: Reviewed & tested by the community » Fixed

Committed to D7 dev

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

alexbern’s picture

additional:
If you're gaining this error:
Undefined offset: 0 in template_preprocess_views_nivo_slider_view_nivo_sliderfields() (line 123)

try to wrap:

      if (!empty($image_url)){
     $image_url = $field_output =  $row->{$field_image_name}[0]['raw']['uri'];
      }

cheers

jasonglisson’s picture

I'm still getting this error. I've done all of these steps and nothing seems to be working.

amirtaiar’s picture

I am still getting the error + obvioslly it shown a blank image when reload the page.

ckng’s picture

@alexbern
Please open new issue for new problem instead of polluting other issues.
If you've patch please create proper patch and attached to the correct issue.

@tk421jag, @amirtaiar
cannot reproduce what you mentioned, make sure you remove all old codes and get the latest dev