I have installed colorbox on my site but can't seem to access it on any of my pages.

I have tested it by having a content type with an image set to the colorbox display format, and by manually adding an HTML link to the body of an article with the class attribute set to "colorbox-load" as described here: https://www.drupal.org/node/1971564 . Neither of these methods seem to work - when I click on the element in question in both cases the browser just navigates straight to the page referred to by the link.

I've tried querying some javascript variables in my browser's dev console to see what's up. I note that on other sites where colorbox is present and working, the variable window.jQuery.colorbox is present and defined as a function, but on my pages it is undefined (though window.jQuery is defined).

Colorbox and Colorbox-load modules are both installed. I have copied the colorbox library to the /libraries directory and my site's status report page confirms that the colorbox library is indeed installed. Is there anything I've missed? Thanks.

I'm using Drupal 8.2.6, Colorbox module 8.x-1.2, Colorbox library 1.6.4, and jQuery 2.2.3.

I'm new to Drupal, so it's possible I've missed something obvious, but I think I followed the instructions in the docs.

Thanks for any help you can give.

Comments

dri_ft created an issue. See original summary.

frjo’s picture

It sounds like it should be working. Do you have a link to the site?

Note the Colorbox and Colorbox load are separate modules with different maintainers.

dri_ft’s picture

Yeah, it seems strange.

Thanks a lot for looking at this.

dri_ft’s picture

Ah, some progress! Slightly embarrassingly, at least some of the problem was because I hadn't cleared the caches.... Doing that seems to have got the colorbox image display type working. The colourbox load link still doesn't seem to be working, but I'm glad colorbox is at least working in some capacity now. I'll keep trying to get the colorbox-load link working and if I can't then perhaps I'll open another issue under that module.

(If you do take a look at the links I gave above, maybe you can let me know if you see anything obviously wrong with the colorbox-load link in the second one.)

In any case, thanks for your help here.

dri_ft’s picture

Status: Active » Closed (works as designed)

I might as well close this.