I have Drupal (5.1) installed in www.mysite.com/drup.
I have Gallery (2.2.1) installed in www.mysite.com/gallery2.
In other words, my G2 installation is NOT inside my drupal directory.
Now, when I go to the Gallery settings in Drupal under Home » Administer » Site configuration » Gallery settings, and click the Install tab, and then Step 2 to see the paths settings, it says:
Gallery2 URL or URI: is /gallery2/ (but this is greyed out)
Gallery2 filesystem path: /home/myusrname/public_html/gallery2/ (which is right)
Embed URI: /drup/?q=gallery (which is right if starting from the "webroot", but incorrect if starting from the drupal root.)

However, when looking at the Drupal logs, I see a myriad of errors being generated by Gallery views. They are all page not found errors looking for something like the following:
http://www.mysite.com/drup/gallery2/themes/classic/theme.css.
Well, this is of course an incorrect path, because the "drup/" part should not be in there.

I can find no way to correct this (though I suppose I could re-install G2 inside my drupal directory).
Any advice?

CommentFileSizeAuthor
#10 gally1.jpg213.25 KBtasigurl
#10 gally2.jpg208.43 KBtasigurl
#10 gally3.jpg211.5 KBtasigurl

Comments

profix898’s picture

Did you update from an older version of the gallery.module? What happens if you click 'Reset & Restart' at the bottom of the page? Is the 'Gallery2 URL or URI' field still grayed out? Generally you should be able to enter any path into this field! Everything else is a logical consequence of the wrong gallery url/uri ...

edinjapan’s picture

Thank you for responding.
Yes it was an "upgrade", though I uninstalled both G2 and the gallery.module and started over. (I did not touch the Drupal database entries though.)
Clicking Reset&Restart doesn't change anything in the paths, and the field for the "Gallery2 URL or URI" is still greyed out and I am not able to enter a different path.
All the paths listed were "auto" generated it appears.
(Note that since I did my original post, I deleted the gallery.module folder and installed the latest 2.x dev version which was updated July 1. I also ran update.php. However, there was no change.)
Is there a way to over-ride the auto path generation?
In my case what would the correct path be? (It seems right from the wording in the explanation which seems to indicate path from webroot, but should this be path from Drupal root? In that case, would my path be ./gallery/?)

edinjapan’s picture

This is a follow-up to my last post.
In order to troubleshoot this, I set up a new installation of Drupal 5.1, and G2 (2.2.2), each with their respective new databases.
I put Drupal in www.mysite.com/dtest, and this time I put G2 inside the Drupal folder, namely www.mysite.com/dtest/gtest.
The standalone works fine, the config.php appears to be correct, etc.
Then I used gallery.module 5.x-2.x-dev (July 1 update) to embed. No errors (except for sync, which immediately goes away when one syncs.)

However, as before, when I go to the Gallery settings in Drupal under Home » Administer » Site configuration » Gallery settings, and click the Install tab, and then Step 2 to see the paths settings, it says:
Gallery2 URL or URI: is /gallery2/ (which is wrong as I didn't use gallery2 for any folder name this time, but this is greyed out anyway)
Gallery2 filesystem path: /home/myusrname/public_html/gallery2/ (which is totally wrong--should be /home/myusrname/public_html/dtest/gtest/))
Embed URI: /dtest/?q=gallery (which is right)
Of course the same page not found errors as before are happening. Clicking reset doesn't help--everything is still grey.

So, what appears to be happening is that gallery.module is finding my other G2 install when it auto configs the URL and filesystem paths, but is finding the correct path for the Embed URI. Obviously I need to be able to over-ride these. How do I do it?

profix898’s picture

I cant really find why this happens on certain systems (and works fine in many cases). However I added some small fixes/changes to cvs. Its still possible that your configuration is incorrectly considered valid, but clicking 'Reset&Restart' should now force the 'locations' step to wait for input. You should see two buttons 1. 'Test locations' and 2. 'Use manual configuration'. The latter will bring you to a form where all three values can be configured manually.
Please let me know if it still doesnt work. Thanks.

edinjapan’s picture

Thank you for working so hard on this.
Well, your changes allowed me to put the paths in for my "test" setup, where G2 is inside the Drupal root. This one now works perfectly.
However, I still can't seem to get my original setup--where G2 is in one directory in the webroot and Drupal is in another directory in the webroot--to work correctly. I have tried all the path variations I can think of.
To clarify, G2 will display (without some formatting) as setup, but just clicking on the Gallery menu item generates file not found errors in the log for files gallery.css, theme.css, and SearchBlock.js.
In each case, the path where the file is being looked for is in webroot/drupalroot/galleryroot rather than just webroot/galleryroot as it should be.
It just seems that somewhere in the code there must be an item that is concatenating the drupalroot where it shouldn't be. I looked through as much code as I could, but was not able to find anything.

profix898’s picture

Can you please post your current values for 1. Gallery2 URL or URI, 2. Gallery2 filesystem path and 3. Embed URI assuming that you switched to manual configuration, right?

edinjapan’s picture

Thank you again for hanging with me on this.
Just for clarity, my installation locations are:
Drupal (5.1): www.mysite.com/drup
G2 (2.2.1): www.mysite.com/gallery2.
My "current" settings, which I did manually, and that do NOT work, are shown below. Note that these are the values that are now shown in the greyed out boxes--not strictly what I entered, because slashes seem to get added automatically.
Gallery2 URL or URI: /gallery2/
Gallery2 file system path: ../gallery2/
Embed URI: /drup/?g=gallery
Also, I tried the same only with the Embed URI set to /?q=gallery. For this one, when I sync users, the setting automatically changes back to /drup/?q=gallery. Maybe this is where the extra drupalroot is being concatenated?
Wait....
I already tried the settings below yesterday.
Gallery2 URL or URI: http://www.mysite.com/gallery2/
Gallery2 file system path: /home/myfolder/public_html/gallery2/
Embed URI: /drup/?q=gallery
but got no different results.
However, today, I made one tweak. I dropped the "www" on the Gallery2 URL or URI. Everything appears to be working!
The "good" values that are working now are:
Gallery2 URL or URI: http://mysite.com/gallery2/
Gallery2 file system path: /home/myfolder/public_html/gallery2/
Embed URI: /drup/?q=gallery

A few things come to mind.
1. My site is set to work with either www.mysite.com or mysite.com.
2. I have a redirect (set with cpanel) for www.mysite.com to take me to www.mysite.com/drup/ and mysite.com also redirects to www.mysite.com/drup/ as well.
3. I was careful to refresh my browser yesterday to clear cache, but maybe there were other caches that need clearing.

Thank you for helping. I am happy to help you with this issue in my environment if you like. I will check back here.

profix898’s picture

Thanks for the details, EdInJapan! I will try myself and think it over for a night. I will let you know what comes out.

susej’s picture

Please follow the help on 'Directory Settings' and check the example which suits your installation, for me Example 1 worked for errors just like yours.

__________________________
Directory Settings
"URI of Gallery2" is the URI of the Gallery2 standalone location. Path from docroot to the directory main.php is located. Protocol / host name are both optional. Examples: /gallery2/, /sub/gallery2/, http://photos.example.com/, www.example.com/photos/main.php
"Location of Gallery2" is the path of your gallery2 installation, either absolute (starts with "/") or relative to your Drupal installation directory. Normally this is auto-detected, but in case this fails you can turn off auto-detection and manually enter a value.
"Embed URI" is the URI needed to access Gallery2 through Drupal. This will end in '?q=gallery' (non-clean URLs) or 'gallery' (clean URLs). Normally this is auto-detected, but in case this fails you can turn off auto-detection and manually enter a value.
Some examples:

Example 1: If your directory structure and website structure is
• Drupal dir: /var/www/web/html/
• Gallery dir: /var/www/web/html/gallery2/
• Website URL: http://www.example.com
• Standalone Gallery2 URL: http://www.example.com/gallery2/
• Then
- "URI of Gallery2" = "/gallery2/" or "http://www.example.com/gallery2/"
- "Location of Gallery2" = "gallery2/" or "/var/www/web/html/gallery2/"
- "Embed URI" = "?q=gallery" or "http://www.example.com/?q=gallery"

Example 2: If your directory structure and website structure is
• Drupal dir: /var/www/web/html/drupal/
• Gallery dir: /var/www/web/html/gallery2/
• Website URL: http://www.example.com/drupal
• Standalone Gallery2 URL: http://www.example.com/gallery2/
• Then
o "URI of Gallery2" = "/gallery2/" or "http://www.example.com/gallery2/"
o "Location of Gallery2" = "../gallery2/" or "/var/www/web/html/gallery2/"
o "Embed URI" = "/drupal/?q=gallery" or "http://www.example.com/drupal/?q=gallery"

Example 3: If your directory structure and website structure is
• Drupal dir: /var/www/web/html/drupal/
• Gallery dir: /var/www/web/html/someotherdir/gallery2/
• Website URL: http://www.example.com/
• Standalone Gallery2 URL: http://www.anotherexample.com/gallery2/
• Then
o "URI of Gallery2" = "http://www.anotherexample.com/gallery2/"
o "Location of Gallery2" = "/var/www/web/html/someotherdir/gallery2/"
o "Embed URI" = "/drupal/?q=gallery" or "http://www.example.com/drupal/?q=gallery"

__________________________
Susej

tasigurl’s picture

Component: Installation / Setup » Installation / Configuration
StatusFileSize
new211.5 KB
new208.43 KB
new213.25 KB

Please Help

I have screen shots here: http://drupal.org/node/155959 I also asked for help here: http://drupal.org/node/220049

I installed the lastest Gallery2 via fantastico. My install is like:
Drupal dir: /var/www/web/html/drupal/
• Gallery dir: /var/www/web/html/gallery2/
• Website URL: http://www.example.com/drupal
• Standalone Gallery2 URL: http://www.example.com/gallery2/

I need help config the paths and locations for the stand alone and the drupal mod. on drupal in the gallery> settings> install it says everything is ok but its not because I can't get to the gallery from drupal.

I dont know what "rule to put in "show item" in my gallery stand alon admin> url rewrite:

On Drupal gallery> settings> install it says:
"Clean URL / URL Rewrite OK There is a writable .htaccess file in your defined Drupal directory (/home/gotantan/public_html/rwolfefamily/). Your 'Show Item' rule should start with 'gallery/'. Make sure to change the URL Rewrite rule(s) accordingly. "

I think I need to change the embed uri but It won't let me change the embed URI:

"Step 2: Gallery2 location settings - Auto Configuration (OK)
Gallery2 URL or URI:

URL or URI of the G2 standalone location. This can be either the full URL to Gallery2 (e.g. http://www.example.com/gallery2) or the path from docroot to the Gallery2 directory (e.g. /gallery2). If using a URI the protocol/hostname are both optional.
Gallery2 filesystem path:
/home/gotantan/public_html/rwolfefamily/gallery2/
Embed URI:
/index.php?q=gallery"