Posted by michaelsilverman on March 24, 2012 at 3:22pm
4 followers
Jump to:
| Project: | Colorbox |
| Version: | 6.x-1.1 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Issue Summary
I just installed the colorbox module on a working site (core 6.22) once the module is enabled an empty colorbox displays on every page of the site. I have no idea where to look for a conflict. Any ideas would be appreciated.
| Attachment | Size |
|---|---|
| colorbox.png | 37.85 KB |
Comments
#1
Have you installed the jQuery update module?
Change the theme to Garland, part of Drupal core, if that works then it's your theme that is the problem.
Turn of other modules and see when the problem goes away.
#2
I followed the instructions above - jQuery update was installed, changed the theme to Garland and turned off all modules except in core jquery update and colorbox and still getting the same results.
Cannot figure why the pop-up is being trigger at every page view. I can disable colorbox for all of my pages but the one that requires it but that does not seem like a good approach.
#3
Does Colorbox work as it should otherwise?
Do you have an example site that you can link to?
#4
#5
After some investigation we discovered that the colorbox js broke some functionality on our node/*/edit pages. Even disabling the checkbox that makes colorbox load on every page and checking that node/*/edit is in the advanced settings didn't solve problems.
eventually this saved us :
<?php/**
* Implements hook_js_alter().
*/
function gemeentemuseum_js_alter(&$javascript) {
// Disable colorbox for admin pages
if(arg(0) == 'node' && arg(2) == 'edit') {
unset($javascript[drupal_get_path('module', 'colorbox') . '/js/colorbox.js']);
}
}
?>
Somehow it looks as if the following code is attached to all textfields and not only those with the colorbox class.
<?phpDrupal.behaviors.initColorbox = {
attach: function (context, settings) {
if (!$.isFunction($.colorbox)) {
return;
}
$('a, area, input', context)
.filter('.colorbox')
.once('init-colorbox-processed')
.colorbox(settings.colorbox);
}
};
?>