Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#39 | vssid-d7-1.patch | 982 bytes | redndahead |
#25 | 1070042-d7.patch | 559 bytes | redndahead |
#19 | undefinedindex-1070042-19.patch | 880 bytes | 13rac1 |
#17 | undefinedindex-1070042-17.patch | 882 bytes | ronan |
Comments
Comment #1
cmcpasserby CreditAttribution: cmcpasserby commentedComment #2
P2790 CreditAttribution: P2790 commentedI'm having the same problem, how did you get it working?
Comment #3
P2790 CreditAttribution: P2790 commentedComment #4
redndahead CreditAttribution: redndahead commentedThat 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
Comment #5
P2790 CreditAttribution: P2790 commentedThanks 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
Comment #6
P2790 CreditAttribution: P2790 commentedGet this now too:
* Warning: array_merge() [function.array-merge]:
Maybe I should revert back
Comment #7
P2790 CreditAttribution: P2790 commentedI 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?
Comment #8
P2790 CreditAttribution: P2790 commentedI 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?
Comment #9
redndahead CreditAttribution: redndahead commentedCan you give me more of what that error says? should have a line number. Warnings shouldn't stop it from working though.
Comment #10
P2790 CreditAttribution: P2790 commentedNotice: 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
Comment #11
gresda CreditAttribution: gresda commentedI 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).
Comment #12
mjgruta CreditAttribution: mjgruta commentedI 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;
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.
so far, I don't have any problems.
Comment #13
mjgruta CreditAttribution: mjgruta commentedEDIT: Double post
Comment #14
sayela CreditAttribution: sayela commentedI 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.
Comment #15
P2790 CreditAttribution: P2790 commentedBeautiful! Works for me, thanks Sayela appreciate it!
Comment #16
redndahead CreditAttribution: redndahead commentedMust 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
Comment #17
ronan CreditAttribution: ronan commentedHere's a patch that fixes the issue without removing the code.
Comment #18
halley CreditAttribution: halley commentedThank you. It realy work :)
Comment #19
13rac1 CreditAttribution: 13rac1 commentedUpdated patch from #17 to apply from module root. Works as described.
Comment #20
vasikeit works.
Comment #21
cmcpasserby CreditAttribution: cmcpasserby commentedthanks a bunch of the patch
the issues came back up when i updated this modual and the patch helped out.
Comment #22
jaialin CreditAttribution: jaialin commented#19 works. Thanks!
Comment #23
deepbluesolutions CreditAttribution: deepbluesolutions commented#19 works for me too
Comment #24
mattcasey CreditAttribution: mattcasey commentedjust found this problem and removing those lines worked
Comment #25
redndahead CreditAttribution: redndahead commentedCan you test this patch it's a little bit smaller.
Comment #26
alphakom CreditAttribution: alphakom commentedPatch in #25 fixed the same problem for me. (Using Views 7.x-3.0-alpha1 and Views Slideshow/Cycle 7.x-3.x-dev.)
Comment #27
gghh2 CreditAttribution: gghh2 commented#19 is fine ;)
Comment #28
redndahead CreditAttribution: redndahead commentedThis has been committed. Thank you everyone.
Comment #29
P2790 CreditAttribution: P2790 commentedsorry 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
Comment #30
redndahead CreditAttribution: redndahead commentedGrr I should have caught that. I comitted a fix. Here is the diff for it http://drupalcode.org/project/views_slideshow.git/blobdiff/c5d56ddf3debb...
Comment #31
P2790 CreditAttribution: P2790 commentedSorry 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
Comment #32
redndahead CreditAttribution: redndahead commentedThis 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?
Comment #33
P2790 CreditAttribution: P2790 commentedI'm sorry, its my fault, I resaved the block I had created and everything is back to normal, sorry for wasting your time
Comment #34
arbel CreditAttribution: arbel commentedI think there's a mistake in the syntax...it doesn't quite work.
here's my fix:
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).
Comment #35
redndahead CreditAttribution: redndahead commentedDid you test a view with multiple of the exact same slideshow?
Comment #36
arbel CreditAttribution: arbel commentedyes,
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
Comment #37
aeotrinI 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.
Comment #38
aeotrinWell I reverted my view, and saved. No Error.
Comment #39
redndahead CreditAttribution: redndahead commented@arbel Can you test this patch please?
Comment #40
arbel CreditAttribution: arbel commentedis there a problem with the change I did in #34 ?
that fixed the problem for me?
against what is the patch?
Thanks
Idan
Comment #41
redndahead CreditAttribution: redndahead commented@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
with
Comment #42
redndahead CreditAttribution: redndahead commentedA fix has been committed.
Comment #43
angramify CreditAttribution: angramify commentedis 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...)
Comment #44
redndahead CreditAttribution: redndahead commentedShould be the dev version.
Comment #45
3rdLOF CreditAttribution: 3rdLOF commentedLastest 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).
Comment #46
kriskhaira CreditAttribution: kriskhaira commentedThis problem appears for me with both 7.x-3.x-dev and 7.x-3.0-alpha1; and with or without the patch.
Comment #47
kriskhaira CreditAttribution: kriskhaira commentedComment #48
kriskhaira CreditAttribution: kriskhaira commentedComment #49
redndahead CreditAttribution: redndahead commentedI 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.
Comment #50
kriskhaira CreditAttribution: kriskhaira commentedThanks! I missed the "no Views Slideshow plugin enabled" error because it was quite inconspicuous.
Comment #51
Shubin CreditAttribution: Shubin commentedI'm pretty new to Drupal, so I'm lost as to how to apply this patch.
Help greatly appreciated.
Comment #52
redndahead CreditAttribution: redndahead commentedUnless 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.
Comment #53
kriskhaira CreditAttribution: kriskhaira commentedShubin, 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.
Comment #54
spovlot CreditAttribution: spovlot commentedSubscribing. Same problem.
Comment #56
pixelsweatshop CreditAttribution: pixelsweatshop commentedsub. same
Comment #57
aosiname CreditAttribution: aosiname commentedtried this but it doesnt work because the problem occurs on line 14...?
Comment #58
aosiname CreditAttribution: aosiname commentedok 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.
Comment #59
watman CreditAttribution: watman commentedI 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.
Comment #60
mrryanjohnston CreditAttribution: mrryanjohnston commentedI 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.
Comment #61
kriskhaira CreditAttribution: kriskhaira commented@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).
Comment #62
ecommercium CreditAttribution: ecommercium commentedIdem #60! brought back the slides without errors!
Comment #63
delboard CreditAttribution: delboard commentedIt 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..
Comment #64
werfu CreditAttribution: werfu commentedI'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!
Comment #65
BuFr CreditAttribution: BuFr commented#63 works for me
Comment #66
sionescu CreditAttribution: sionescu commented#63 happens to me because i was missing jquery.cycle.all.min.js in the libraries folder
Comment #67
jorisx CreditAttribution: jorisx commented#63 worked :)
also had Format: Show panel fields selected, now changed it to just fields and it works :)
Comment #68
Net Mystic CreditAttribution: Net Mystic commentedI 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