I have gallery2 integrated into Drupal 5.7, I just discovered that when I' log-off from the site, the home throws a white page caused by gallery2 module and disappear if I uninstall the gallery module in drupal.
Error:

Notice: Use of undefined constant GALLERY_IMAGEBLOCK_SIZE_DEFAULT - assumed 'GALLERY_IMAGEBLOCK_SIZE_DEFAULT' in /var/www/vhosts/artblueprint.org/httpdocs/sites/all/modules/gallery/gallery.module on line 10

Notice: Use of undefined constant GALLERY_GRID_SIZE_METHOD_DEFAULT - assumed 'GALLERY_GRID_SIZE_METHOD_DEFAULT' in /var/www/vhosts/artblueprint.org/httpdocs/sites/all/modules/gallery/gallery.module on line 11

Notice: Use of undefined constant GALLERY_GRID_SIZE_DEFAULT - assumed 'GALLERY_GRID_SIZE_DEFAULT' in /var/www/vhosts/artblueprint.org/httpdocs/sites/all/modules/gallery/gallery.module on line 12

Notice: Use of undefined constant GALLERY_SEARCH_SIZE_METHOD_DEFAULT - assumed 'GALLERY_SEARCH_SIZE_METHOD_DEFAULT' in /var/www/vhosts/artblueprint.org/httpdocs/sites/all/modules/gallery/gallery.module on line 13

Notice: Use of undefined constant GALLERY_SEARCH_SIZE_DEFAULT - assumed 'GALLERY_SEARCH_SIZE_DEFAULT' in /var/www/vhosts/artblueprint.org/httpdocs/sites/all/modules/gallery/gallery.module on line 14

Notice: Use of undefined constant GALLERY_FILTER_MAXSIZE_DEFAULT - assumed 'GALLERY_FILTER_MAXSIZE_DEFAULT' in /var/www/vhosts/artblueprint.org/httpdocs/sites/all/modules/gallery/gallery.module on line 15

Notice: Use of undefined constant GALLERY_FILTER_EXACTSIZE_DEFAULT - assumed 'GALLERY_FILTER_EXACTSIZE_DEFAULT' in /var/www/vhosts/artblueprint.org/httpdocs/sites/all/modules/gallery/gallery.module on line 16

I spent three days testings different things: re-run gallery2 intaller, upgrader, etc with no luck.
I desperately need help here.

Thanks

Comments

tclusellas’s picture

Category: bug » support
ajudson’s picture

I've just spotted this same error with latest g2 module & drupal 5.14. It is related to a bug in gallery.module with the definition of constants, accorting to the php.net (http://uk2.php.net/constants) constants should be defined as follows:

define('MY_CONST','blah') - correct
define(MY_CONST,'blah') - incorrect

the gallery.module uses the 2nd format i.e. incorrect, so to remove the bug just add the single quotes around the first parameter. although this may be correct in php 4 ?

Andy

profix898’s picture

Category: support » bug

Oh yes. I changed this in the Drupal 6 version of gallery module, but it seems I missed it for the 5--2 branch. Do you have a patch? Otherwise I will make the required changes myself and commit an update shortly. THANKS.

profix898’s picture

Title: gallery2 module incompatibility? » Definition of constants incompatibility
Status: Active » Fixed

Committed to 5--2 branch. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.