Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
When I use the Views Cycle and I add a pager all works fine. But there is one issue;
on the initial page load, no pagers are active. After the second slide is loaded, all works fine.
After some JS debugging I found out that on the first call options.SlideNum
in Drupal.viewsSlideshowPagerFields.transitionBegin
has a value of 2, and I have 2 slides.
After that, the number toggles between 0 and 1.
Any thoughts?
Comment | File | Size | Author |
---|---|---|---|
#10 | views_slideshow-pager_fix_for_first_slide-1367302-10.patch | 1.48 KB | MustangGB |
#4 | views_slideshow-first_slide_is_not_last_slide_plus_one-1367302-4.patch | 1.23 KB | MustangGB |
Comments
Comment #1
Marty2081 CreditAttribution: Marty2081 commentedI work on the same project as Baris. If we disable the option " Start On Last Slide Viewed" the pager of the first slide correctly gets a class "active" on page load. So the issue must be somewhere in there.
Comment #2
pandabrand CreditAttribution: pandabrand commentedI am having this issue as well but it's not related to the "Start On Last Slide Viewed" option. For me it's tied to using advanced options when I add more than one advanced option,(I am using the before and after option) the active class stops appearing. I don't know how or if this is tied to this in any way but on the JS where the option are displayed it looks like this.
when i only have one option the advanced_option_choices and advanced_options_entry are both empty and active class works when I add a second,(doesn't matter if it's before or after) it will end up in those two and the active class goes away. Maybe it's correlation but it happens consistently for me. Anybody know what's happening there?
Comment #3
pandabrand CreditAttribution: pandabrand commentedActually it seems to be with the 'before' portion of advanced options, it works fine with 'after' but not before and i can't see what is wrong with it and it's really screwing up my site, I kind of need this to work. anyone?
Comment #4
MustangGB CreditAttribution: MustangGB commentedSuper annoying bug, I'd say this is a major priority
Comment #5
MustangGB CreditAttribution: MustangGB commentedClarifying issue
Comment #6
Geijutsuka CreditAttribution: Geijutsuka commentedI'm having the same issue at http://thinktank.arizona.edu/testing-page-2 (will try #4 patch asap)
Except in my case, the .active class doesn't get applied when I tell the slideshow to start with a random slide (done by showing the "View Transition Advanced Options" and checking the Random box or adding "random = true" in the "jQuery Cycle Custom Options" section).
Comment #7
Geijutsuka CreditAttribution: Geijutsuka commentedI applied the patch to a new install of 7.x-3.x-dev and the latest D7. It still looks as if the active class isn't getting applied to the correct initial slide.
Comment #8
MustangGB CreditAttribution: MustangGB commentedCan you give the steps to reproduce?
Comment #9
Geijutsuka CreditAttribution: Geijutsuka commentedI followed this tutorial to set up the show with an image pager:
http://www.brightwebsitedesign.com/how-to-install-views-slideshow-module...
The only difference is that I checked the Random box under View Transition Advanced Options.
Comment #10
MustangGB CreditAttribution: MustangGB commentedHere is an updated version that fixes the pager active class for the first slide when random order is in use.
I have a feeling it needs jquery.cycle.all.js version 2.9999 or later, however I used version 2.9999.5 for my testing.
Comment #11
Geijutsuka CreditAttribution: Geijutsuka commentedThe patch works like a charm! Just like you said though, use jQuery Cycle 2.9999 or later. Mine is working on jQuery 2.9999.5.
Comment #12
MustangGB CreditAttribution: MustangGB commentedHave you committed this to the git repository?
If not, then you should instead use RTBC
Comment #13
Geijutsuka CreditAttribution: Geijutsuka commentedSorry about that akamustang. Thank you for clarifying the status (I'm not quite sure how to commit to the git repository...).
Comment #14
MustangGB CreditAttribution: MustangGB commentedThat is for a module maintainer to do.
Comment #15
TimG1 CreditAttribution: TimG1 commentedAnother confirmation. #10 worked for me. Patched on 7.x-3.x-dev (2012-Apr-25)
-Tim
Comment #16
wangqizhong CreditAttribution: wangqizhong commentedThanks a lot to BarisW, akamustang and everyone else for the great work on the patches, testing, reviews and reporting.
It's more time this got committed and I went ahead and had this rolled at:
7.x-3.x: 5528a45
Marking this as fixed.
Please let me know if you would have any other questions, comments, issues or concerns on any of these changes, I would be glad to provide more information.
Thanks again to everyone for the help and great work on this issue.
Cheers!
Comment #17
wangqizhong CreditAttribution: wangqizhong commented