I recently upgraded a client site to Drupal 5.5 and gallery module version 5x-2.0, and initially everything seemed fine - all the images and albums showed up fine, URL Rewrite was working OK, everything seemed good.
But now the client says they can't upload images any more. If they go to an album via the standalone Gallery (which is the way they've always uploaded, since the Gallery admin pages don't work very well when embedded in their Drupal theme), and click on Add Items, the form shows up fine, but when they select the images to upload, enter the captions, and submit the form, they get a Drupal "Page Not Found" page. And the URL it displays when it gets this is http://www.example.com//gallery2/main.php - which is the standalone gallery, not the embedded one! Drupal shouldn't be doing anything with any page under the gallery2 directory -- the embedded installation should only show up under the /gallery directory, not /gallery2.
And even stranger, if I just go to http://www.example.com//gallery2/main.php, without submitting a form to get there, it loads just fine, as the main page of the standalone Gallery, the way you'd expect.
I don't understand how the same page can be 404 as a form destination, but show up fine when accessed on its own! That just makes no sense to me...
And I don't know why or how Drupal has any access to the gallery2 directory. I'm guessing something perhaps got messed up in the .htaccess file for that to be able to happen, but I've looked at it and am not really sure what to look for. I did find a snippet of code that my web host had given me in order to exempt the site stats from showing up a Drupal 404 page, which was as follows:
RewriteBase /
RewriteCond %{REQUEST_URI} ^/(stats|failed_auth\.html)/?(.*)$ [NC]
RewriteRule ^.*$ - [L]So I tried duplicating that and replacing "(stats|failed_auth\.html)" with "(gallery2|main\.php)", but it didn't make any difference.
I saw a reference in another issue to someone else's problems with "page not found" errors being attributed to "stuff not getting put back in the .htaccess file", but that's awfully vague. What "stuff" exactly should I be looking for in there? Or is this even an .htaccess issue at all?
Also: if I wanted to downgrade to 5x-1.0, could I do that by just uploading the old files again, or would there have to be database changes?
Comments
Comment #1
spidersilk commentedBTW, the double slash in the URLs above is a typo - it should just be one slash.
Also - the reason I set the priority to critical is that the client has some new content they really need to upload and they're very upset about this.
Comment #2
steinmb commentedIt still could be something with the URL rewrite. You can easy check this by turning off URL rewrite in Gallery2 standalone and Gallery Drupal plugin.
What you also could do is to go to:
http://example.com/index.php?q=gallery&g2_view=core.SiteAdmin&g2_subView...
And save again the URL-rewrite settings to your .htaccess file. That could solve your problems.
--
Stein Magne
Comment #3
profix898 commentedAs steinmb mentioned this sounds like a rewrite configuration issue. Any news?
Comment #4
jingram623 commentedI am having the same problem. I have recently installed a "new" installation of Drupal and then installed the Gallery2. I am very familiar with Gallery, however a know very little about Drupal. I have set up the rewrite config both ways and still get the same result.
I am going to explore the .htaccess issue if I can. You can view my site and problem at:
http://drupal.ingramphotography.com/gallery
Thanks for any help or ideas.
Jeff Ingram
Comment #5
steinmb commentedIngram: Pls read my post #2 and give it a try.
--
Stein Magne
Comment #6
jingram623 commentedI tried that. I get an error on standalone gallery in the rewrite section: An error occured while trying to save your settings
Cannot write to the .htaccess file. I changed the file permissions on .htaccess in both the drupal and gallery2 directories to 666 using the CHMOD.
Still get the same message in the Gallery standalone URL rewrite section.
ji
Comment #7
steinmb commentedCheck for error messages in apache error log and your system log (if you have access). 666 should solve it, if not is writing to the .htaccess wrong place? or SELinux problem?
Comment #8
steinmb commentedClosed due to inactivity.