Closed (fixed)
Project:
Colorbox
Version:
7.x-2.12
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
17 May 2016 at 18:06 UTC
Updated:
16 Oct 2016 at 12:12 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
frjo commentedPlease pick another style in the Colorbox settings (admin/config/media/colorbox). The plain style you have selected has no buttons, it's plain. Try the default style e.g. and you will have buttons.
Comment #3
sammyframson commentedHi frjo,
Thanks so much for the quick help!
I did go in and change the configuration as you indicated but now I am not getting the galleries to load at all. It appears that only the first image loads and there is still no navigation.
here are the configuration settings:
http://awesomescreenshot.com/0e05wudx08
And here is the live page:
http://www.durangosilvertonrailroad.com/durango-train/train-cars
I flushed all caches and did a hard refresh and still having trouble.
Here is a glance at how the gallery is set up:
Could it be related to the images coming from a different domain?
Thank you again for any assistance you can provide in getting me pointed in the right direction!
Comment #4
frjo commentedIt seems that you are using the dev version instead of an official release of Colorbox. The dev version has replaced the use of the rel attribute with a "data-colorbox-gallery" attribute, see #1429784: Use data attribute instead of rel to be HTML5 valid.
Try to replace all instances of
rel="Closed Coach"
with
data-colorbox-gallery="closed-coach"
Comment #5
proteo commentedHi, I just updated to 7.x-2.11 (released today) and lost those buttons as well, which had been working fine so far. The solution was to update the Colorbox library using the link provided in the module's page (it turns out I was using a very old version).
Hope it helps somebody else.
To the mantainers: I'm not sure whether still is possible or not, but it would be useful to have a message in the release page urging users to upgrade the library before updating the module to this version.
Comment #6
hass commentedThat is not fixed in 2.11. It was there in the 2.10 and now with 2.11 the one gallery per page is no longer working. The next and previous buttons on the bottom are simply missing. I'm using Standard profile.
Downgraded to 2.10 and it recovered.
Comment #7
proteo commentedHi Hass. Not sure if I understand what was the error in 2.10 youre talking about but I don't think the issue here is about fixing a bug, but about why these buttons are not being displayed.
And the reason is because in the last release (and in dev versions for a while) the code was updated to use a different attribute in the HTML link. In sammyframson case, the problem is that he was using the old attribute. In my case, updating to the latest version of the Colorbox library fixed the problem (I guess the old one was looking for the deprecated attribute).
Did you try to update the library as suggested?
Comment #8
hass commentedYes, the forward/backward buttons are missing after I have upgraded to colorbox module 2.11. With 2.10 all works fine.
Colorbox library version I have installed is Version 1.6.1 - 2015/05/14. Not very old. That should be more or less the latest version. There is no note what JS lib version may be required.
Comment #9
proteo commentedI don't know about that version, but I can tell you that 1.6.4 is works just fine with 2.11 (I know for sure because I just updated 3 different sites).
The download link for the latest 1.x branch version is available from the Colorbox project's page, but I'm posting it here for your convenience:
https://github.com/jackmoore/colorbox/archive/1.x.zip
Give it a try, just make sure to flush caches afterwards. Let us know if this solves the issue.
Comment #10
hass commentedIf this is required, than the library hook need to be changed to make sure people have a compatible version installed. Still a bug in the module than.
I try to test the newer lib versions.
Comment #11
hass commentedUpgraded both the lib to 1.6.4 and colorbox 2.11 and on a views gallery (colorbox formatter for images) it works, but where we inserted images with colorboxes in node bodies it does not work.
Cleared all caches several times including browser cache. The buttons are simply missing.
It recovers once I downgrade colorbox module. I'm now on JS lib 1.6.4 and module 2.10 and it works, but not with 2.11. No idea what the difference here could be.
Comment #12
Wolfgang62 commentedUpgraded a working 1.6.1 and 2.10 site to 1.6.4 and 2.11. Result: No arrows any more.
Went back to 2.10 and all was good again.
Comment #13
frjo commentedThe problem is not the the Colorbox plugin version. See comment #4 above for the solution to your problems.
Comment #14
Wolfgang62 commentedI´m using the link from Proteo in #9 and colobox plugin 2.11.
No dev versions, cleared the cache and still no arrows.
Comment #15
hass commentedI have hundreds of nodes with colorboxes embedded. Please add an update hook and fix all occurences if you make such changes. Otherwise we need a compatibility layer that works for the old html and the new.
I will check tomorrow if this hint is correct. Cannot remember these mentioned code.
Comment #16
frjo commentedJust committed this patch to 7.x-2.x, please test and if it works for people I will make a 7.x-2.12 release.
The patch adds a check to see if data-colorbox-gallery is set and if not use the old "rel" attribute instead.
I thought that custom implementations with Colorbox used the colorbox-load or colorbox-inline solutions.
Comment #17
caw67 commentedi have the same errors! no navigation no more...
the partch '16 works for me
Comment #18
xtaz#16 works fine for me with 1.6.4 and 2.11.
Thanks
Comment #19
frjo commentedComment #20
frjo commentedA new release is out https://www.drupal.org/project/colorbox/releases/7.x-2.12
Comment #21
hass commented<a class="colorbox colorbox-insert-image init-colorbox-processed cboxElement" href="/sites/default/files/styles/1024x1024/public/foo.jpg?itok=5_asRyAL" rel="gallery-all"><img alt="my title" class="image-medium float-left" height="210" src="/sites/default/files/styles/medium/public/foo.jpeg?itok=5b1fdYAH" width="140"></a>That HTML code looks a bit different to what you noted in #4.
Comment #22
frjo commented@hass just replace rel attribute with data-colorbox-gallery but with version 7.x-7.12 both will work.
Comment #23
wurzi commentedI updated to 7.x-7.12 and colorbox 1.6.4 but the buttons are still missing -> https://www.tvmalans.ch/content/herrschaeftler2016bilder.
Switching style to "standard" is also not a solution.
Comment #24
frjo commented@wurzi Your colorbox.js file is missing this section:
It can be as simple as you need to clear the Drupal cache for css+js. You can also have multiple version of the Colorbox module and an older version is loaded.
Comment #25
wurzi commented@frjo thank you, I found the problem, the minified js-files were not updated. Clearing the cache was not enough.
Comment #27
grahamshepherd commentedI am still encountering this problem. I am using Colorbox 7.x-2.12. My colorbox.js file is as above. But inserted image links do not get the rel="gallery-all" attribute. No Prev/Next. No image count. Pages created previous to 7.x-2.12 worked OK and continue to work OK. I have uninstalled and reinstalled the colorbox module, checked that I am using the latest library. Insert image gallery is set for per page gallery. Still no joy.
This page works: http://telsoc.org/ajtde/2015-12-v3-n4/a28 (posted 2016-01-04)
This does not: http://telsoc.org/ajtde/2016-03-v4-n1/a44 (posted 2016-07-03)
I don't quite get #25. How do I update the minified js-files?
Comment #28
grahamshepherd commentedComment #29
frjo commented@GrahamShepherd If you look at the template colorbox-insert-image.tpl.php in the colorbox module folder you see that it adds a "data-colorbox-gallery" attribute as replacement for the old "rel" attribute.
I can't see it in the HTML code of your page so either it's not inserted or it gets filtred out. Can you see it if you edit a node?
Comment #30
grahamshepherd commentedExcellent, thank you frjo.
I had to add a[data-colorbox-gallery] to the Extra allowed content in the CKEditor ACF. Or, for others, data-colorbox-gallery in the allowed attributes for the "a" element in the WYSIWYG filter.
All fixed for me
Comment #31
grahamshepherd commentedComment #32
hass commentedThat's a bug than. Colorbox need to tell ckeditor about this as I know.
Comment #33
frjo commentedIf someone want to commit a patch that integrates with wysiwyg editors I will test and commit it but I do not use any myself. But that should be in an new feature request issue.
Comment #34
grahamshepherd commentedPerhaps the colorbox module could check the settings of CKEditor ACF filter and WYSIWYG filters, if enabled, and report a configuration error to the Drupal status report.
Comment #35
manoloka commented#25 sorted it for me
thanks