1

I can't seem to get the colorbox plugin (colorbox-6.x-1.0) working with my Drupal 6.22 site. I'm currently working on Ubuntu Natty, and this is the folder structure for how I have the plugin and module setup:

 - sites
    - all
       - libraries
          - colorbox
             - colorbox
                - jquery.colorbox-min.js
                - jquery.colorbox.js
             - [other folders: content, examp1, examp2, examp3, examp4, examp5]
    - default
       - modules
          - colorbox
             - colorbox.module
             - etc, etc

Other stuff I already have done:

  • jQuery Update plugin installed
  • set permissions on sites/all/libraries folder using chmod a+w ~/public_html/drup_test/sites/all/libraries
  • flushed all caches

I'm still after all of this getting the "You need to download the Colorbox plugin and extract the entire contents of the archive into the sites/all/libraries/colorbox folder of your server" error. Please could someone help me as I don't know what else could be the problem.

Thanks!


EDIT: SOLVED!!

With iStryker's help, I realised that there was some weird permission setting on the /sites/all folder. Whilst I haven't sorted out the permission issue on that folder, this alternative worked (if this has also happened to you)...under /sites/default/ create a folder called libraries and put your jQuery plugins there. Then in Drupal Admin > Administer by Module > Colorbox > Colorbox Plugin Settings, change the plugin path to /sites/default/libraries/colorbox. Not the grandest solution, but it works! Note that this also worked for the ShadowBox module and plugin.

2
  • Any errors on admin/settings/colorbox page?
    – iStryker
    Jul 21, 2011 at 15:10
  • yes, the same message above "You need to download the Colorbox plugin and extract the entire contents of the archive into the sites/all/libraries/colorbox folder of your server". I really don't get what could be the issue...all files are where they should be according to the documentation.
    – Shalan
    Jul 21, 2011 at 16:15

1 Answer 1

1

Revised:

Your directory structure is correct. Your file directory permissions are not. Your chmod a+w command gives read and write permissions. In your case, to get rid error message you must have read and execute permission on the /sites/all/libraries/colorbox & /sites/all/libraries/colorbox/colorbox directories and read permissions on the 2 javascript files. Colorbox.module does a file_exist call

if (file_exists($library_path .'/colorbox/jquery.colorbox.js') && file_exists($library_path .'/colorbox/jquery.colorbox-min.js')) {

Depending on your operating system, and setting, PHP's file_exists() function is handle differently.

9
  • Hi. Unfortunately, that doesn't work either
    – Shalan
    Jul 21, 2011 at 12:46
  • I'm working on ubuntu linux...d you think it could be a permission issue?
    – Shalan
    Jul 21, 2011 at 13:06
  • depends, You files do look right. remember to recursively change all the files in the libraries directory
    – iStryker
    Jul 21, 2011 at 13:21
  • my answer has been revised, please ignore Shalan first comment.
    – iStryker
    Jul 21, 2011 at 16:37
  • ok, let me try your suggestions
    – Shalan
    Jul 21, 2011 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.