On a dev site here, running Drupal 7 beta 3:

http://dev.laundryrobots.com/node/4

works beautifully when I'm not logged in, but as soon as I log in I lose colorbox. Some kind of strange permissions issue going on?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jenyum’s picture

Tested as an authenticated user, works just fine. This is only happening when logged in as user 1 (super admin).

hutch’s picture

Is there any javascript that only runs when you are in as admin? This is probably a js clash IMHO.

jenyum’s picture

Title: Colorbox not working for admin when logged in, Drupal 7 » Colorbox conflicts with Toolbar, Core Drupal 7 module
Issue tags: +conflict

Thanks, yes it looks like it is. Conflicts with the 'toolbar' module that is part of core in Drupal 7. When I disable that, it works fine. Changing the title of this issue to reflect that.

frjo’s picture

Assigned: Unassigned » frjo
Status: Active » Needs review

I may have fixed this in one of the commits I made today to 7-dev.

I could not replicate your problems when testing the latest Colorbox 7-dev with Drupal 7-dev as of this morning.

Please try it out and report back here.

jenyum’s picture

Hi frjo,

Sadly, it doesn't seem to solve the problem. Installed the latest dev version, cleared all of my caches and still having the same issue.

Have you tried it with the Bartik theme and toolbar turned on?

This is what the Chrome console gives me for errors:

Uncaught TypeError: Object function (a,b){return new c.fn.init(a,b)} has no method 'cookie'

frjo’s picture

jenyum, make sure you got the latest version. The tarballs for dev is rebuilt only every 6 or 12 hours or something like that.

I run 7-dev code of Drupal from CVS, not the beta release. This could be the difference.

I use Bartik since it's the new default theme and Toolbar module is active, as it is by default.

I could not replicate the problem in Safari or in Firefox.

hutch’s picture

I have tested colorbox on current beta3 of D7, using current dev of colorbox, it is working fine for me, tested in chrome, firefox, safari and opera.

aspilicious’s picture

Latest dev still gives conflicts with the toolbar...
Had to deinstall it

Nr. 18’s picture

Think i have created a duplicate: http://drupal.org/node/1010556

I have used the Theme: Corolla 7.x-1.20
I have used Drupal Core 7 RC 4
I have used the dev version of colorbox -> 2011-Jan-02

Both Safari and Firefox (logged in as admin user and a guest user) are receiving the error:

$("a, area, input", context).filter(".colorbox").once("init-colorbox-processed").colorbox is not a function
[Break On This Error] .colorbox(settings.colorbox);
backwardgraphics’s picture

I too am having issues running the latest dev and on drupal-7.0. I can confirm that it appears to be some sort of issue with the toolbar modules. Except I am using admin_menu in place of toolbar but still having issues.

frjo’s picture

I'm afraid I have never seen this problem. I'm now using Drupal 7.0 and have tested Colorbox a lot since I'm trying to figure out some Views integration problems. I have not encountered any JavaScript errors at all. Colorbox is working very well for me (except for the Views integration bugs ;-).

Nr. 18’s picture

Can you do a clean installation of Drupal 7 and install and enable the module? Maybe you have an extra module that provide some functionality that we are missing?

asermartinez’s picture

Same problem here , not working with admin or other authenticated user loged in.
I've tried 7.0 and 7-dev./

I tried to disable toolbar module, but no effect.

backwardgraphics’s picture

I had this issue as well turned out it's caused by not having the color library installed properly. If you check site status with colorbox enabled you can see if its installed or not. Because a lot of us are using the multi-site setup if you put the colorbox library in example.com/libraries/colorbox the module will not recognize it. Fortunately the developer added a field in the advanced settings for the module to allow you to change this. Make this change and you should be working. To find this if you are having troubles navigating there go to the example.com/admin and then navigate to Configuration->Media->Colorbox. Its the box on the very bottom called advanced settings. Once you have library installed properly problem fixed.

flickerfly’s picture

I can not click on the gear after select colorbox in the content types display fields option when ctools is enabled. I've disabled it and it works fine.

aspilicious’s picture

Same for me, issue caused by bad installation of colorbox library

frjo’s picture

Status: Needs review » Closed (works as designed)
teflo’s picture

Title: Colorbox conflicts with Toolbar, Core Drupal 7 module » Colorbox conflicts with image style, Core Drupal 7 module
Version: 7.x-1.x-dev » 7.x-1.3
Component: Code » User interface
Assigned: frjo » Unassigned
Raphael Apard’s picture

Version: 7.x-1.3 » 7.x-1.x-dev
FileSize
371 bytes

I have the same issue during ajax request :

$("a, area, input", context).filter(".colorbox").once("init-colorbox-processed").colorbox is not a function

The following patch works for me. Replacing "$.isFunction($.colorbox)" by "$.isFunction($('a, area, input', context).colorbox)" in js/colorbox.js.

star-szr’s picture

Status: Closed (works as designed) » Reviewed & tested by the community

Patch in #19 works to fix gear button on Manage display pages.

frjo’s picture

Status: Reviewed & tested by the community » Closed (cannot reproduce)

I think the real issue here is not having the Colorbox plugin installed correctly as some have mentioned above.

Recent changes to the Colorbox module also makes this patch not apply.

star-szr’s picture

The Colorbox library was installed correctly, #20 ended up being an issue with jQuery update, carry on…

roynilanjan’s picture

Issue summary: View changes

Fix in #19 works, also there are some compatibility issue mentioned in https://www.drupal.org/node/1605428
so instead of $.isFunction() , jQuery() has suggested...

roynilanjan’s picture

Status: Closed (cannot reproduce) » Needs review

Status: Needs review » Needs work

The last submitted patch, 19: colorbox-js_colorbox_is_not_a_function-983316-19.patch, failed testing.

roynilanjan’s picture

Revised the patch according to current 2.x-dev branch!

roynilanjan’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 26: colorbox-js_colorbox_is_not_a_function-983316-26.patch, failed testing.

roynilanjan’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Needs work » Needs review

phayes’s picture

Status: Needs review » Reviewed & tested by the community

I've tested patch in comment #26 and it works. Hurray!

smcd’s picture

I have been trying to get Colorbox to work all week, I have reinstalled Drupal 7, cleared caches, reinstalled Colorbox, colorbox plugin and jquery_update and no matter what I do the gear is missing in Manage Display. Can anyone advise or help me out here I have run out of ideas to fix this. This has never happened to me before I am at a complete loss now. If anyone can help I thank you in advance. Regards SMCD.

Chris Matthews’s picture

The patch in #26 still applies cleanly to 7.x-2.x-dev and fixes the issue (latest drupal core 7.61). Would it be possible to get this committed?

Neslee Canil Pinto’s picture

Tested and works fine

Neslee Canil Pinto’s picture

Status: Reviewed & tested by the community » Fixed
Neslee Canil Pinto’s picture

Status: Fixed » Closed (fixed)