installed drupal 4.6 RC in a test directory
installed gallery-cvs module
installed gallery2 beta
set them up using the same database

enable block Gallery Navigation
set path to gallery2 in administer -> settings -> gallery

can upload images using From Web Browser or From Web Page

Drupal does not show the images - it shows the image names and other gallery information
http://bnow.net/test/gallery

gallery2 does display all the images and of course the same data as drupal.
http://bnow.net/gallery2/

2. Perhaps a separate bug
enabling block Gallery Image
leads to the following error

implode(): Bad arguments. in /usr/www/users/bnow/test/modules/gallery/gallery.module on line 141.

3. Also experiencing the same bug as
http://drupal.org/node/18785

when trying to use applet upload from drupal
it works from gallery2

Comments

gregoryo’s picture

seems to be a path or path parsing related error.
my directory structure is:
www/gallery2/
www/test/ - for drupal installation

in administer -> settings -> gallery

"gallery
Location of Gallery2:
relative path to your gallery2 directory. Please include a trailing slash ("/")."
what is this path supposed to be relative to? the module or site directory?

---
i've tried both
../gallery2 - which produces the error in my original post

and
../../gallery2 - which produces the error below

warning: _gallery_init(../../gallery2//embed.php): failed to open stream: No such file or directory in /usr/www/users/bnow/test/modules/gallery/gallery.module on line 233.
warning: _gallery_init(): Failed opening '../../gallery2//embed.php' for inclusion (include_path='.:/usr/local/lib/php') in /usr/www/users/bnow/test/modules/gallery/gallery.module on line 233.

Fatal error: Undefined class name 'galleryembed' in /usr/www/users/bnow/test/modules/gallery/gallery.module on line 249

---
creating a symbolic link in the
test directory
ln -s ../gallery2/ gallery2
with the setting of the path ../gallery2/
works.

if this works, why doesn't setting the path
to ../../gallery2 work?

Anonymous’s picture

It looks like you fixed it, what did you do?

gregoryo’s picture

as stated above, the problem seems related to paths.
to make it work, i can
create a symbolic link from the default path hard coded in the gallery.module

$galleryDir = variable_get('gallery_dir', 'gallery2/');

to the location where i have installed gallery2
in my /test/ drupal directory

ln -s /usr/www/users/bnow/gallery2 gallery2
kennyg’s picture

Version: » 4.6.x-1.x-dev
Component: Code » Miscellaneous
Priority: Critical » Minor

I had the same problem. I put the gallery directory under drupal like /drupal/gallery2 and that seemed to work fine.

Cheers!
Ken

japester’s picture

I have a similar problem.
http://westernd.arach.net.au/gallery2/ works
http://westernd.arach.net.au/drupal/ works
http://westernd.arach.net.au/drupal/gallery/ does not display images.
but!
http://westernd.arach.net.au/drupal/<anything_else> displays the block images.

which makes me slightly confused.
I do get in my logs lots of these:

gallery2/images/gallery.gif not found.
gallery2/images/xhtml10.png not found.
(and some more not founds)

which seems to indicate that somewhere in the gallery.module a directory is not being parsed properly, but I haven't found it yet.
japester’s picture

changing line 231 of gallery.module to the following:

$galleryDir = variable_get('gallery_dir', '../gallery2/');

fixed it for me.

odd, as the second element of the variable_get() function is the default value, so I daresay that some random section of the gallery.module is unable to get the defined value of $galleryDir.

kymbermtx’s picture

This didn't work for me, I have my gallery2 directory in the main directory of drupal (ie /htdocs/gallery2) and its in the same dir (htdocs/ drupal files)

Anonymous’s picture

I installed Gallery2 on my IIS Drupal 4.6 server and the thumb images do not display. It is showing the failed download of the image. Clicking on the image, loads it correctly and going into Gallery2 also works fine.

Checking the image src tag for the webpage, it is returning:

<img src="http://www.ericwoodford.com/index.phpgallery2/main.php?g2_view=core:DownloadItem&amp;g2_itemId=380&amp;g2_serialNumber=6" width="150" height="113" id="IFid1" class="ImageFrame_none" alt="Exploratorium Exploring" longdesc=""/>
    

If I cut and paste this path, and remove the index.php from the line, the thumb loads correctly. I am guessing this is due to me not running clean-urls on this install (Windows, IIS and all).

Can the file name be removed from the image path?

alexandreracine’s picture

Status: Active » Closed (fixed)

Please update the version of this module, drupal, and try again.

For the random image block issue, get the fix here. http://drupal.org/node/31398