Integration:Drupal:Troubleshooting - Gallery Codex
Personal tools


From Gallery Codex

Revision as of 10:47, 30 September 2012 by Dayo (Talk | contribs)

NOTE: This documentation is for the g2bridge module for Drupal 4, 5 or 6.
For Drupal 7+, please refer to the [ G2Drupal Bridge

Installation / Configuration issues

Everything works in Drupal and Gallery2 individually, but not embedded

Here are some things to check:

  • Check the Gallery settings 'Install' page (admin/settings/gallery/install) for errors/notices.
  • Do you have the "Image Block" plugin installed and activated in Gallery2?
  • Are the paths to your G2 installation specified correctly?
  • Turn off "URL Rewrite" in G2 and try again (see below for #URL Rewrite issue)
  • You may need to temporarily turn off Drupal's "devel" module to allow some links to work properly when viewing the embedded G2 administration pages.

URL Rewrite issues

Error (ERROR_MISSING_OBJECT) : Parent 7 path *

Depending on your configuration this can happen because the rewrite rules generated by Gallery2 apply to paths other than For example if you have set your 'Show Item' rule to gallery/%path% in G2 the rule also applies to some Drupal paths, such as admin/settings/gallery/filter or similar paths. To solve this issue you have two choices:

  1. Change your 'Show Item' rule to gallery/v/%path% (to make it more unique)
  2. Prefix the rewrite rules manually with \ , i.e. change the generic regexp RewriteCond %{THE_REQUEST} /gallery/([^?]+)(\?.|\ .) in your Drupal's .htaccess file to RewriteCond %{THE_REQUEST} \ /gallery/([^?]+)(\?.|\ .) (so that it only applies where 'gallery' is at the beginning of the path)

Please also refer to the URL Rewrite tutorial.

Javascript or CSS issues

CSS styles missing or broken

Is Gallery2 installed in a sub-directory of Drupal? If no, create a symbolic link as described in Install instructions. Some features like CSS/JS cascading with Drupal styles and scripts is only available if G2 is installed inside the Drupal root directory.

Thickbox/Lighbox doesnt work correctly

Most (out-of-the-box) configurations of Thickbox/Lightbox require a certain order of styles/scripts in the page, for this Drupal CSS/JS cascading is required. See above.

JS error for G2 "Search box"

This only happens if the "Search box" is enabled in the sidebar of your G2 theme AND the "Gallery Navigation" block is disabled in Drupal. Only in this case the JS is added and unable to find the textfield thus regenerating a js error. There are two options to solve this problem:

  1. Remove the "Search box" in G2. (You can replace it with the Drupal "Search" block.)
  2. Enable the "Gallery Navigation" block in Drupal.


Blank page / White screen of death

If the page appears blank then it is likely that your PHP memory limit is too low. See G2 FAQ (PHP Memory Limit)