Drupal Media Gallery & Colorbox

Anyone who has tried to user the Media Gallery module on a site that already has the Colorbox module installed will know that they do not play well together.  If you have both modules enabled, create a gallery (with lightbox capabilities) and try to click a thumbnail, the lightbox will not show.

This is because, essentially, Colorbox is being called twice, once by the Colorbox module and second by the Media Gallery module.  To fix this without applying any patches or editing any code, follow these steps:

Pathauto

  1. If you do not have the Pathauto module installed and enabled (most likely you already do), do so now
  2. Go to Configuration > URL aliases > Patterns
  3. In the Pattern for all Gallery paths textfield, type galleries/[node:title]
  4. Click the Save configuration button at the bottom of the page.

Colorbox

  1. Go to Configuration > Colorbox
  2. Click Advanced settings at the bottom of the page
  3. In the Deactivate Colorbox on specific pages textarea, add galleries/* to the bottom of the textarea so it looks like this:
    admin*
    img_assist*
    imce*
    node/add/*
    node/*/edit
    galleries/*
  4. Click the Save configuration button at the bottom of the page.
You will need to edit any existing galleries you have created, ticking the Automatic alias checkbox under the Url path settings tab and clicking the Save button.
 
This will essentially disable the Colorbox module for all galleries so that the Media Gallery module can use it's own implementation of Colorbox.  Let's keep our fingers crossed that the Media Gallery development team decides to rely on the Colorbox module in the future for lightbox functionality.