I get this error. And the editing modes are not stable.

Notice: Undefined property: view::$_vns_captions in include() (line 45 of /WWW/kas.siteograf.com/sites/all/modules/views_nivo_slider/views-nivo-slider-view.tpl.php).
Warning: Invalid argument supplied for foreach() in include() (line 45 of /WWW/kas.siteograf.com/sites/all/modules/views_nivo_slider/views-nivo-slider-view.tpl.php).

Comments

dragonfighter’s picture

Status: Active » Patch (to be ported)

Please open and update the file "views-nivo-slider-view.tpl.php" with the code below (lines 45-55):

    <?php if(is_array($view)): ?>  <?php // bug fix 1129444 ?>
    <?php foreach($view->_vns_captions as $vns_id => $vns_caption): ?>
      <div id="<?php print $vns_id ?>" class="nivo-html-caption">
        <?php print $vns_caption; ?>
      </div>
    <?php endforeach; ?> <?php //bug fix 1126946 ?>
    <?php endif; ?>  <?php // bug fix 1129444 ?>
siteogra’s picture

After this correction there is a white screen.

Maybe there is an inaccuracy in the code?

But notice that at the minimum settings without having to patch works. The error still shows.

CPxiom’s picture

Hello "siteogra",
After you make the corrections above, you need to add one more endif; after the endif; // bug fix 1129444

Hope this helps.

dragonfighter’s picture

StatusFileSize
new967 bytes

You may have done something wrong. Please use the file below:

siteogra’s picture

A similar error in version 6.
To solve it to the same piece of code (from dragonfighter on April 19, 2011 at 1:11pm ) to insert in line 40-44

edvanleeuwen’s picture

Please correct me if I am wrong, but I think

if(is_array($view))

should read

if(is_array($view->_vns_captions))

.

View is an object and the if-part always fails.

asauterChicago’s picture

@edvanleeuwen

Yesssss! This did the trick. I replaced if(is_array($view)) with if(is_array($view->_vns_captions)) and now it works perfectly! No more errors. I couldn't even get Views Slideshow to work without problems on Drupal 7, but Nivo Slider works perfect now! Thanks!

melissa81’s picture

I'm kinda lost, after following the instruction to replace lines 45 to 55 and adding a closing end if php tag, there were no more errors but the images are now not displaying for me as an unauthenticated used whereas the permissions to view nodes have already been granted.

This is an export of my views, please advice if you see any errors which might have led to this. Thanks.

$view = new view;
$view->name = 'nivo';
$view->description = 'Nivo View';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Nivo';
$view->core = 7;
$view->api_version = '3.0-alpha1';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'Nivo';
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['query']['options']['query_comment'] = FALSE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '5';
$handler->display->display_options['style_plugin'] = 'views_nivo_slider';
$handler->display->display_options['style_options']['imagefield_preset'] = 'thumbnail';
$handler->display->display_options['style_options']['effect'] = array(
  'random' => 'random',
);
$handler->display->display_options['style_options']['animSpeed'] = '3000';
$handler->display->display_options['style_options']['pauseTime'] = '5000';
$handler->display->display_options['style_options']['directionNav'] = 'false';
$handler->display->display_options['style_options']['controlNav'] = 'thumbsIC';
$handler->display->display_options['style_options']['controlNavThumbsField'] = 'title';
$handler->display->display_options['style_options']['controlNavThumbsIC'] = 'thumbnail';
$handler->display->display_options['row_plugin'] = 'fields';
$handler->display->display_options['row_options']['inline'] = array(
  'field_image' => 'field_image',
);
$handler->display->display_options['row_options']['hide_empty'] = 0;
$handler->display->display_options['row_options']['default_field_elements'] = 1;
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = '';
$handler->display->display_options['fields']['title']['exclude'] = TRUE;
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['external'] = 0;
$handler->display->display_options['fields']['title']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['title']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['title']['element_default_classes'] = 1;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 0;
/* Field: Content: Image */
$handler->display->display_options['fields']['field_image']['id'] = 'field_image';
$handler->display->display_options['fields']['field_image']['table'] = 'field_data_field_image';
$handler->display->display_options['fields']['field_image']['field'] = 'field_image';
$handler->display->display_options['fields']['field_image']['label'] = '';
$handler->display->display_options['fields']['field_image']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_image']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_image']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_image']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_image']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_image']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_image']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_image']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_image']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_image']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_image']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_image']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_image']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_image']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_image']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_image']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_image']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['field_image']['click_sort_column'] = 'fid';
$handler->display->display_options['fields']['field_image']['settings'] = array(
  'image_style' => 'nivostyle',
  'image_link' => '',
);
$handler->display->display_options['fields']['field_image']['field_api_classes'] = 0;
/* Sort criterion: Content: Post date */
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'node';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
/* Filter criterion: Content: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 0;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
  'nivo_ct' => 'nivo_ct',
);

/* Display: Block */
$handler = $view->new_display('block', 'Block', 'block');

-Mel.

himtuna’s picture

I am not able to get it working on drupal 7.
I have gone through many issue pages, a lot of people have reported that drupal 7 version is working for them. I tried applying patches, makes changes here and there. But just couldn't get this wonderful module working.
Kindly post the entire patched module for D7, if it is working for you.

ymazigo’s picture

thanks #4 fix my problem

kaylsbeth’s picture

Got this working after applying the above bug fixes posted by dragonfighter and Calin. Module is working quite well, but whenever I make an edit in views and save it (whatever I'm editing in particular, not the entire view), I get a wall of code I do not understand. If I use the back button to get out of it, all is fine, and the edit is made. So far as I can tell, it does not cause any major problem--just a mild annoyance. Should I be concerned?

ckng’s picture

Assigned: siteogra » Unassigned
Status: Patch (to be ported) » Postponed (maintainer needs more info)

Please try out the latest dev and report back if you still have the problem, thanks.

kaylsbeth’s picture

Reinstalling the last dev version jut undid everything I had done in the first place to get the slider to work (my boss is having issues getting the slider to work on chrome on mac, hence what otherwise would have been an unneeded attempt).

meramo’s picture

Same error on latest drupal 7

alexbern’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new1.43 KB

Hello,

I fixed this issue with a new branch version + added another bug fix to avoid error messages when no field is selected. I did alot of test and have nivo now run under live. Use it with Zen Theme: no Errors.

@ckng: as i can see no problems anymore, you could go for first stable (or beta) version after reviewing. I've also commited the new views-nivo-slider-view.tpl to the branch.

cheers alex

mikeinvaldosta’s picture

Bingo! Thx

FreeFox’s picture

Tested it too and errors are gone ;) Thanks Alex

Argus’s picture

Yeah the errors are gone with #15

druplerjr’s picture

Category: bug » support

Just installed the most recent dev verison for 7 and get the error:
Notice: Undefined property: view::$_vns_captions in include() (line 45 of /home/bneale/public_html/sites/all/modules/views_nivo_slider/views-nivo-slider-view.tpl.php).
Warning: Invalid argument supplied for foreach() in include() (line 45 of /home/bneale/public_html/sites/all/modules/views_nivo_slider/views-nivo-slider-view.tpl.php).

If someone has this working, could you upload a corrected views-nivo-slider-view.tpl.php file?

Remon’s picture

Status: Needs review » Reviewed & tested by the community

It works!!! Thanks guys.
@druplerjr, test the patch in comment 15.

patoshi’s picture

commit ? subbing

chrishrtmn’s picture

I too am receiving this warning/notice. Need this module for 7.x to work flawlessly as soon as possible. =)

Subscribing.

mermentau’s picture

@chrishrtmn, Patch at #15 did the job for me too.

superkuton’s picture

Patch # 4 worked for me.
Thanks.

borgewarvik’s picture

Patch #15 worked for me.

txumari’s picture

I get this error, and with de solutions disapear the error message, but in Chrome the image doesn´t show.

Any idea?

ckng’s picture

Status: Reviewed & tested by the community » Fixed
StatusFileSize
new874 bytes

#15

+++ b/views-nivo-slider-view.tpl.php
@@ -29,29 +29,29 @@
-    <?php print $title; ?>
+    <?php print render($title);?>

$title do not need to be render()'ed

+++ b/views-nivo-slider-view.tpl.php
@@ -29,29 +29,29 @@
+ <?php print render($field_link);?>
   <?php if($rows): ?>
-
+      <div class="overlay">
+        <div class="roundcorners"></div>  <!-- roundcorners arround slideshow image -->
+      </div>

these looks like your own codes?

Committed the attached patch: 544e390

khan2ims’s picture

Hi,
Most of the errors are gone. But now it's showing this error

Notice: Undefined offset: 0 in template_preprocess_views_nivo_slider_view_nivo_sliderfields() (line 122 of /sites/all/modules/views_nivo_slider/views_nivo_slider.module).

Please help.

Edit: I filtered it for a node, and now it works fine.

ermannob’s picture

Please note that several error levels exist in php, and yours is just a "notice", not a "warning", nor an "error". I think you can safely suppress notice messages at server level.

mekuchii’s picture

It worked.Thanks. Just copied and pasted the whole file.

Status: Fixed » Closed (fixed)

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