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.
9 images loaded by 3 seperate views. each with its own pager with seperate IDs.
A1 B1 C1
A2 B2 C2
A3 B2 C3
pager next on column c so its as such
A1 B1 C4
A2 B2 C5
A3 B2 C6
click on C4 to trigger a Colorbox but A1 is then loaded into the box.
Any ideas why this might be happening?
Comment | File | Size | Author |
---|---|---|---|
#8 | colorbox_inline_links_1215436.patch | 542 bytes | frjo |
Comments
Comment #1
frjo CreditAttribution: frjo commentedDo you have an example page that is public?
Comment #2
jimshreds CreditAttribution: jimshreds commentedhttp://grahamartanddesign.com/n
Comment #3
frjo CreditAttribution: frjo commentedIt looks like the Colorbox trigger field doesn't work with Views ajax pager. My guess is that this can be fixed by hooking in the filed to the ajax pager in one way or another. I can't say when I can commit time to this unfortunately.
My suggestion is to use a standard image field instead.
Comment #4
peterx CreditAttribution: peterx commentedI get a similar problem with a Views 3 view paging ordinary pages. It looks like a similar conflict between colorbox and Views Ajax pager. In my case I can step forward through pages in a view but not backwards. When I switch Colorbox off, the pager works. I tried the dev version of Colorbox and nothing changed. Any idea where I should start working the problem?
Comment #5
peterx CreditAttribution: peterx commentedThe problem stopped occurring with the dev version after reloading, refreshing, etc. everything.
Comment #6
arkjoseph CreditAttribution: arkjoseph commentedPeterx, I have gone with the latest dev version and I am still seeing the issue. Do you know the release date?
Comment #7
sbakht CreditAttribution: sbakht commentedHere's a bit of a bootleg fix I came up with.
In colorbox_handler_field_colorbox.inc which is in the views folder,
change:
To:
The problem was the url always ended in #colorbox-"type"-"a number here". Whenever a page is loaded the number at the end of the url which is the variable "i" increments by 1 for each popup link. With the pager, it loads again, going back to i = 0. So this fix will give you a random number so you won't end up getting the same url link. Unlikely, but its possible you will get the same number again, but you can just append more random numbers to lessen the chance.
Comment #8
frjo CreditAttribution: frjo commentedI suggest using "mt_rand()" since it performs better.
Please test this patch and report back here.
Comment #9
frjo CreditAttribution: frjo commentedIf you are having this problem please test the patch in #8. If it works well I will commit it right away.
Comment #10
frjo CreditAttribution: frjo commentedCommitted to 7.x-2.x.
Comment #12
alexaffonso CreditAttribution: alexaffonso commentedI'm currently working in a project that uses Colorbox 7.x-2.4, Views 7.x-3.7 and Video.js 7.x-2.2. I created a Block view to show all my video content and added a Colorbox trigger to open such videos in a lightbox. It works well if I display all the videos insise the block at once and use scroll to navigate through each one. However, when adding a pager to the view (doesnt't matter what), the lightbox opens and does not load the video since I navigate to some other page than first. Then, even if I return to the first page I can't get the content loaded into the lightbox.
I tried disabling Ajax and with it turned off, everything works great. But with Ajax turned off the page path changes and every page is reloaded. As my design does not need to reload the page at all, just the block itself, such behavior ruins my page animations, reloading it too.
Is there anyway I can fix it? I tried the #8 patch with no success.
I appreciate any help.
Best Regards,
Comment #13
frjo CreditAttribution: frjo commented