Notice: Undefined index: in template_preprocess_views_slideshow() (line 14 of /home/cmcpaserby/domains/13dragonstudio.com/public_html/sites/all/modules/views_slideshow/theme/views_slideshow.theme.inc).

anyone got a clue i just made a block view that uses the views_slideshow in drupal 7.x and i get this php error.

yes i know it is alpha i just really want to get this working since i used it a lot back with drupal 6.x

Comments

Status:Active» Closed (fixed)

I'm having the same problem, how did you get it working?

Priority:Normal» Major
Status:Closed (fixed)» Active

That error would make it seem the view isn't being passed in. Maybe don't have the right version of views with the right version of views_slideshow

Thanks for the reply, I have views 7.x-3.0-alpha1 with slideshow 7.x-3.x-dev. I'll try a different version of views

Title:Notice: Undefined index: in template_preprocess_views_slideshow()I updated views to the latest dev and get even more errors

Get this now too:

* Warning: array_merge() [function.array-merge]:

Maybe I should revert back

I don't get why I get this problem and no one else has, are people using drupal 7.0 or are they using the dev version?

I don't get why I get this problem and no one else has, are people using drupal 7.0 or are they using the dev version?

Can you give me more of what that error says? should have a line number. Warnings shouldn't stop it from working though.

Title:I updated views to the latest dev and get even more errorsNotice: Undefined index: front_page-block_1 in template_preprocess_views_slideshow() (line 19 of /opt/lampp/htdocs/d7_aps/sites/

Notice: Undefined index: front_page-portfolio_slideshow in template_preprocess_views_slideshow() (line 19 of /opt/lampp/htdocs/d7_aps/sites/all/modules/views_slideshow/theme/views_slideshow.theme.inc).

This is the error I get.
I'm using:

Views 7.x-3.0-alpha1
Views Slideshow 7.x-3.x-dev

The slideshow is working correctly, I'm using a block display, I get this error on any page the block is displayed on.

Thanks

I updated views and views_slideshow with the today's versions, and now I have the same issue with 3 blocks using views_slideshow:

* Notice: Undefined index: block_services-block_1 dans template_preprocess_views_slideshow() (ligne 19 dans /srv/www/htdocs/d7/sites/all/modules/views_slideshow/theme/views_slideshow.theme.inc).
* Notice: Undefined index: news_list-block_1 dans template_preprocess_views_slideshow() (ligne 19 dans /srv/www/htdocs/d7/sites/all/modules/views_slideshow/theme/views_slideshow.theme.inc).
* Notice: Undefined index: slider_accueil-block_1 dans template_preprocess_views_slideshow() (ligne 19 dans /srv/www/htdocs/d7/sites/all/modules/views_slideshow/theme/views_slideshow.theme.inc).

Title:Notice: Undefined index: front_page-block_1 in template_preprocess_views_slideshow() (line 19 of /opt/lampp/htdocs/d7_aps/sites/Undefined index: in template_preprocess_views_slideshow() line 19 - $instances[$vss_id]++;

I also experience this but only when i'm not logged in as an admin/user.
I don't have any problems except with this * Notice: Undefined index:.
I also updated my views & vews_slideshow to feb 28 dev.

I use my old views_slideshow to revert it back and the problem is gone, then I checked the codes and see that on line 19 on the latest dev they added this part below $vss_id = $view->name . '-' . $view->current_display;

<?php
$vss_id
= $view->name . '-' . $view->current_display;
 
$instances[$vss_id]++;
  if (
$instances[$vss_id] > 1) {
   
$vss_id .= "_" . $instances[$vss_id];
  }
?>

I don't know what this code means because i'm still a newbie but I think you can temporary bypass it by removing the said code or changing the code to this someone fix this.

<?php
$vss_id
= $view->name . '-' . $view->current_display;
 
/*$instances[$vss_id]++;
  if ($instances[$vss_id] > 1) {
    $vss_id .= "_" . $instances[$vss_id];
  }*/
?>

so far, I don't have any problems.

Title:Undefined index: in template_preprocess_views_slideshow() line 19 - $instances[$vss_id]++;Undefined index: in template_preprocess_views_slideshow() line 19 - $instances[$vss_id]++

EDIT: Double post

I experienced the same problem. What I did to get around this was to comment out this:

/**
$instances[$vss_id]++;
if ($instances[$vss_id] > 1) {
$vss_id .= "_" . $instances[$vss_id];
}
*/

in line 19 of: sites/all/modules/views_slideshow/theme/views_slideshow.theme.inc

Don't really know the effect though but it worked for me very fine for now.

Beautiful! Works for me, thanks Sayela appreciate it!

Must have been a bug in my last commit. That code is only really useful if you have the same slideshow on the same page. So commenting out shouldn't hurt most people

Component:Miscellaneous» Code
Category:support» bug
Priority:Major» Normal
Status:Active» Needs review
StatusFileSize
new882 bytes

Here's a patch that fixes the issue without removing the code.

Thank you. It realy work :)

Status:Needs review» Reviewed & tested by the community
StatusFileSize
new880 bytes

Updated patch from #17 to apply from module root. Works as described.

it works.

thanks a bunch of the patch

the issues came back up when i updated this modual and the patch helped out.

#19 works. Thanks!

#19 works for me too

just found this problem and removing those lines worked

Status:Reviewed & tested by the community» Needs review
StatusFileSize
new559 bytes

Can you test this patch it's a little bit smaller.

Patch in #25 fixed the same problem for me. (Using Views 7.x-3.0-alpha1 and Views Slideshow/Cycle 7.x-3.x-dev.)

#19 is fine ;)

Status:Needs review» Fixed

This has been committed. Thank you everyone.

Status:Fixed» Active

sorry to reopen this, but I get this in the newest release:

Error
Notice: Undefined index: in template_preprocess_views_slideshow() (line 14 of C:\localserver\xampp\htdocs\d7_aps\sites\all\modules\views_slideshow\theme\views_slideshow.theme.inc).

Also the slideshow doesn't display at all

Status:Active» Fixed

Grr I should have caught that. I comitted a fix. Here is the diff for it http://drupalcode.org/project/views_slideshow.git/blobdiff/c5d56ddf3debb...

Status:Fixed» Active

Sorry redndahead, it didn't work for me, still getting this error:

Notice: Undefined index: in template_preprocess_views_slideshow() (line 14 of C:\localserver\xampp\htdocs\d7_aps\sites\all\modules\views_slideshow\theme\views_slideshow.theme.inc).

This is what is in my file:

function template_preprocess_views_slideshow(&$vars) {
static $instances = array();
$options = $vars['options'];
$main_frame_module = $options['slideshow_type'];
$settings = $options[$main_frame_module];
$view = $vars['view'];
$rows = $vars['rows'];
$num_divs = count($rows);
$vss_id = $view->name . '-' . $view->current_display;
$instances[$vss_id] = isset($instances[$vss_id]) ? $instances[$vss_id]++ : 0;
if ($instances[$vss_id] > 1) {
$vss_id .= "_" . $instances[$vss_id];
}

Which I could help out, just don't have the knowledge yet.
Thanks for your hard work

This is another problem that should be in another issue, but the gist of that error is there is no slideshow type chosen. Do you have Views Slideshow Cycle module enabled?

Status:Active» Closed (fixed)

I'm sorry, its my fault, I resaved the block I had created and everything is back to normal, sorry for wasting your time

I think there's a mistake in the syntax...it doesn't quite work.

here's my fix:

  if(isset($instances[$vss_id]))
    $instances[$vss_id]++;
  else
    $instances[$vss_id] = 1;

I'm not sure why the shorthand didn't work but when using the shorthand all the $instances[$vss_id] values where 1 (I tested this with a view with multiple slideshows).

Did you test a view with multiple of the exact same slideshow?

yes,

I have a view with a slideshow.
I have a node with a view reference field that refrences that views slideshow (with an argument to limit the results).
Then I have another view that loads a bunch of nods (those with the view's refrence)
so essentially I"m loading the same view a few times.

you can take a look here:

http://premiumbaby.co.il/koziol/drupal-7.0/list

When I used your patch the controls for all the slideshows affected only the first slideshow. and I printed out this $instances[$vss_id] and saw that it was all 1

so I tried to play with it and replaciing the shorthand syntax with a full one worked....

Idan

I am still getting the error
Notice: Undefined index: in template_preprocess_views_slideshow() (line 14 of C:\localserver\xampp\htdocs\d7_aps\sites\all\modules\views_slideshow\theme\views_slideshow.theme.inc).

Just a simple view, all settings are the same as in the d7 tutorial, and no slideshow appears in the block on the front page.

Patches applied and dev versions on views, views_slideshow and ctools are being used.

Well I reverted my view, and saved. No Error.

StatusFileSize
new982 bytes

@arbel Can you test this patch please?

is there a problem with the change I did in #34 ?

that fixed the problem for me?

against what is the patch?

Thanks

Idan

@arbel No it's about the same. I just moved some pieces to make the code cleaner. I just wanted to make sure in doing that I didn't create any other issues. You can apply it against the latest dev, but the gist of it is replace

  if(isset($instances[$vss_id]))
    $instances[$vss_id]++;
  else
    $instances[$vss_id] = 1;
  if ($instances[$vss_id] > 1) {
    $vss_id .= "_" . $instances[$vss_id];
  }

with

  if (isset($instances[$vss_id])) {
    $instances[$vss_id]++;
    $vss_id .= "_" . $instances[$vss_id];
  }
  else {
    $instances[$vss_id] = 0;
  }

A fix has been committed.

is the fix committed in the alpha version or in the dev version?
I just installed the alpha version and views 7.x-3.0-beta3
and I'm getting this notice
Undefined index: in template_preprocess_views_slideshow() (line 14...)

Should be the dev version.

Lastest DEV of views as of today:

Notice: Undefined index: in template_preprocess_views_slideshow() (line 13 of /Users/natuk/Sites/drupal7/sites/all/modules/views_slideshow/theme/views_slideshow.theme.inc).
Warning: Invalid argument supplied for foreach() in template_preprocess_views_slideshow() (line 47 of /Users/natuk/Sites/drupal7/sites/all/modules/views_slideshow/theme/views_slideshow.theme.inc).

Status:Needs work» Closed (fixed)

This problem appears for me with both 7.x-3.x-dev and 7.x-3.0-alpha1; and with or without the patch.

Notice: Undefined index: in template_preprocess_views_slideshow() (line 13 of /Users/kris/DEV/imii/sites/all/modules/contrib/views_slideshow/theme/views_slideshow.theme.inc).

Status:Closed (fixed)» Needs review

Status:Needs review» Needs work

Status:Closed (fixed)» Fixed

I have made a commit that will throw a better error message. Do you have views slideshow cycle enabled? The gist of it is there is no main slideshow module specified.

Thanks! I missed the "no Views Slideshow plugin enabled" error because it was quite inconspicuous.

I'm pretty new to Drupal, so I'm lost as to how to apply this patch.

Help greatly appreciated.

Unless you need it immediately I would wait until tomorrow when the latest development release is made. Or more than likely just enable views slideshow cycle.

Shubin, I ended up using Views Slideshow 7.x-3.x-dev without any patches. Make sure both views_slideshow and views_slideshow_cycle are enabled. And in your View, check inside the "Settings" page next to the Slideshow link for any errors.

Subscribing. Same problem.

Status:Fixed» Closed (fixed)

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

sub. same

tried this but it doesnt work because the problem occurs on line 14...?

ok heres how i got it working

I am using
views 7.x-3.0-beta3
Views Slideshow 7.x-3.0-alpha1
Views Slideshow: Cycle 7.x-3.0-alpha1
Views UI 7.x-3.0-beta3

no patches added at all.
The reason it happened was because of the dialog widget that you do the settings in for the views slideshow.

The scroller failed to appear so i couldnt do all the settings way down the bottom or even click apply
I thought you just click the x to save changes.

So i guess something was not set therefore I got the message.

I disabled all modules above and reenabled
Used tab to get to the options way down bottom in the dialogue window.
This worked for me.

I had this problem when I added a new view and selected create a block and slideshow as my display format on that initial screen. After I edited the view and change settings in the format section, the slideshow worked and the error went away.

I still run into this issue:

Notice: Undefined index: in template_preprocess_views_slideshow() (line 14 of /srv/http/drupal/sites/all/modules/views_slideshow/theme/views_slideshow.theme.inc).

Edit:
Installed dev version of the module. Seemed to do the trick.

@mrryanjohnston, you can tell whether a fix has been rolled into a version other than dev by comparing the release date and the date a ticket was changed to fixed.

In this case, Views Slideshow 7.x-3.0-alpha1 was released on 2011-Mar-12 but the fix was committed on April 5, 2011 (see comment #49).

Idem #60! brought back the slides without errors!

It seems that the error (Notice: Undefined index: in template_preprocess_views_slideshow() (line 14 of ...\sites\all\modules\views_slideshow\theme\views_slideshow.theme.inc) occurs if I select the format "Slideshow" when I first create a new view.
If you select some other format first and then change it to Slideshow, it works fine.

Maybe that helps..

I've found that this error happens when you enable the View Slideshow module without any Slideshow submodule like View Slideshow Cycle. Simply enable one, than go into the view, edit the view parameter and set the display parameter of the Slideshow to use the one you've just enabled. It did the trick for me!

#63 works for me

#63 happens to me because i was missing jquery.cycle.all.min.js in the libraries folder

#63 worked :)
also had Format: Show panel fields selected, now changed it to just fields and it works :)

I was having the same problem for awhile. After spending a whole day trying to debug this, I finally realized that I had used the Field Permissions module to limit viewing of the slideshow fields to certain roles (with the intention of preventing unauthorized users from editing slideshow fields in the node edit form). Once I turned on the "View anyone's value for field Slide Image" permission for all roles, the slideshow works fine!

If you've activated the Field Permissions module, this may be your solution! Hope this helps!

~ Net Mystic