URL Rewrite issue:
donkasok
Joined: 2008-09-16
Posts: 21 |
Posted: Tue, 2008-09-16 07:39 |
Hi, I am usin drupal and gallery 2 for my website.Everything was working fine before i enabled url rewrite.Now i am able to access all gallry from gallery side. But In drupal it showing gallery menu .Once i click it goes to gallery main page . But once i clik the albums insie the gallery page 'Page not found error is showing'. From Gallery side,http://xxx.net/gallery2/main.php is the main page of gallery and from drupal side I am able to access my album called photo gallery from gallery side. The url is showing http://xxx.net/gallery2/v/Photo+Gallery/. But In drupal side if i click on the album named photo gallery its showing error The requested page could not be found. The url is showing http://xxx.net/v/Photo+Gallery/ Please help me clear this issue. with regards, |
|
Posts: 27300
You might have better luck in this forum:
http://gallery.menalto.com/forum/78
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 21
Hi,
After a long struglling of 3 days , i finished gallery 2 integration with drupal.
Here is the details
Software used :
DRUPAL 6.4 ,GALLERY 6.x-1.x-dev(DRUPAL MODULE), GALLERY gallery-2.3-rc-1
STEPS TO FOLLOW :
Create a folder gallery2 inside drupal.
Install your Gallery 2 inside that folder.
Access the gallery using url eg: www.xxx.com/gallery2 and install it make sure you enabled url rewrite plugin.
Copy the galery module of drupal inside sites/all/modules and enable it.
Access the gallery setings inside the drupal navigation menu.
Use the manual configuration and set as follows:
Gallery2 URL or URI: /gallery2/
Gallery2 filesystem path: ./gallery2/
Embed URI: /index.php?q=gallery
Gallery base: gallery
Finish it and access URL Rewrite Administration ,you can access it by clicking on gallery on drupal navigation > site admin > Url rewrite
inside setup you can see Embedded Setup .it will show below the Allow empty referer? . You must access the side admin of gallery from drupal to see the embeded setup.
Absolute path to the folder of your embedded .htaccess: /var/www/drupal
Please enter the Url to your environment. E.g. http://www.mySite.com/myNiceCMS/ : /(a slash usually refer to drupal directory).
Make sure the htaccess file (inside drupal folder have a write permission you can set it to 666 or 777).
Enjoy guys
with regards,
Don.K.Asok
Posts: 78
Hi
Your steps really helped me. So far I could able to complete Drupal Adminster > Gallery Settings > Install. But I do see this against
Clean URL / URL Rewrite OK There is a writable .htaccess file in your defined Drupal directory (/~/www/). Your 'Show Item' rule should start with 'gallery/'.
Make sure to change the URL Rewrite rule(s) accordingly.
Does it mean that I just need to run chmod back to original settings after completing the configuration. Or is it something else.
Thanks
Posts: 78
And I went to Drupal site > Gallery > Site Admin > URL Rewrite > URL Rewrite Administration > Setup
Which I got the following message without any errors are warnings.
-------------------------------------------------------------
Approved referers
The parser you have selected does not support a referer check.
-------------------------------------------------------------
and Test screen shows
-------------------------------------------------------------
Test the Rewrite Parser Configuration
PHP Path Info Support
Testing if the server supports PHP Path Info.
Success <<< I did not see this on the screen but copy and pasting here shows Success <<<
------------------------------------------------------------
Could you let me know if something is wrong in the above result in Setup screen.
Thanks
Posts: 21
Hi,
Did you set up url rewrite inside gallery2.
Go directly to gallery 2 WWW.your domain.com/gallery2 will lead to this page.Inside admin url rewrite you can see a show item set it to gallery/v/%path% ... save
Don.K.Asok
Posts: 21
inside drupal --> gallery settings ---> general ---> links to the most relevent drupal and gallery settings --->Links to Gallery2 Site Admin sections ---> Embeded url Rewrite settings --->did u sset every thing correcly.
Don.K.Asok
Posts: 21
PHP Path Info Support - SUCCESS. After your configuration are u able to see this... if not you must check did your host support php path support. Its better to use Apache mod_rewrite. Its stable everywhere. But php path support is lacking unoiformity among different servers.
Don.K.Asok
Posts: 78
Thank you for the note. I fixed the show item rule on Gallery side and then everything looks OK with green status on Drupal > Gallery Settings > Install Page Items except these items.
1.
Step:Drupal Modules / Gallery2 Plugins
Status: Advisory
Description: You may have some loss in functionality in your embedded Gallery2 (see below for details). You should check the details and if the functionality is not important for your site you can just ignore this
2.
Step:XML Sitemap
Status: Advisory (disabled)
Description: Enables the Drupal and Gallery2 sitemaps to be merged which allows for a single sitemap to be sent to Google and other web search sites
Thanks
Gallery version = 2.2.6 core 1.2.0.8
PHP version = 5.2.4 apache
Webserver = Apache/1.3.41 (Unix) PHP/5.2.4 mod_log_bytes/1.2 mod_bwlimited/1.4 mod_auth_passthrough/1.8 FrontPage/5.0.2.2635 mod_ssl/2.8.31 OpenSSL/0.9.7a
Database = mysqli 4.1.22-standard, lock.system=flock
Toolkits = Exif, Ffmpeg, Getid3, ImageMagick, NetPBM, Gd, LinkItemToolkit, Thumbnail, SquareThumb, ArchiveUpload
Acceleration = none, none
Operating system = Linux cp33.myhostcenter.com 2.6.9-67.EL.JLsmp #1 SMP Wed Nov 21 15:34:57 EST 2007 x86_64
Default theme = matrix
gettext = enabled
Locale = en_US
Posts: 49
donkasok,
yes, i see yours steps ref( http://drupal.org/node/307214) , i did the same to solve my url rewrite. the stepwise clarity you presented is good.
regards,
James
Posts: 21
Did u enabled xml site mapping inside gallery. Then u must disable it. Login to gallery2 directly -> inside url rewrite after show item rules u will able to see site map.. deactivate it..
Don.K.Asok
Posts: 78
Hi Asok,
Site map item was already disabled in Gallery. Is there any other place that I need to check?
Thanks
Posts: 21
If u want to have sitemap 4 gallery u can enable it . Then it will integrate it with drupal site map.
Can u please describe wht are the issues u r getting....
Don.K.Asok
Posts: 31
I have a test install running, but getting clean URL to work seems impossible The problem is that the Gallery module install script looks happy with no error messages but it never writes rewrite rules to Drupal .htaccess.
Drupal 5.10
PHP 5.2.6
Web server Apache/2.2.8 (EL)
Gallery installation is located inside:
sites/default/gallery2
Clean URL enabled in standalone Gallery2 and are working.
Settings: v/%path%
Test link for direct access to gallery2 install: http://test.tbsk.no/sites/default/gallery2/main.php
Drupal .htaccess is set to 0644 and are owned by the "webserver user". Just for fun I set the file to 777 but with same result. I have tried to reinstall the module by using the module uninstall script and by using the Devel module. I think there is a old bug in _gallery_install_step_urlrewrite then I have seen so many people struggling with clean url and Gallery2.
--
Steinmb
Posts: 21
Did u enable clean url inside drupal..
Don.K.Asok
Posts: 21
The htaccess must have write permision.
Don.K.Asok
Posts: 31
4am I discovered that what the gallery module was asking for was not Drupal .htaccess it IS THE gallery2 .htaccess! Arrrrgh Gallery module does not then give any error messages and does not write to ( the wrong) .htaccess, don't through out any error messages. Everythings seems dandy but nothing is working...
Q: Why do we have to use the v/%path% ?
I would preferred to be able to define freely this path.
Posts: 13
Maybe it's allready mentioned, but have you considered this:
The term "embedded htaccess" in url_rewrite-settings in gallery admin is a little confusing, my problems concerning rewrite were solved after the above change.
Wim
Posts: 3
Hi
I have a problem with Clean URLs using Drupal 6.5 and Gallery 2.3.
Clean URLs works fine BUT in my gallery mysite.tld/gallery(this url works) is next page link written as "mysite.tld/index.php?q=gallery&g2_page=2"(this url works). It should be "mysite.tld/gallery/2"(this url works too but it is not shown in gallery page)!
Confusing is that in user's gallery located in "mysite.tld/gallery/username" next page links works fine - "mysite.tld/gallery/username/2" etc.
Same bug for keywords: link from "mysite.tld/gallery" looks like "mysite.tld/index.php?q=gallery&g2_view=keyalbum.KeywordAlbum&g2_keyword=mykeyword" BUT similar link in keyword page looks like "mysite.tld/keyword/mykeyword"
Could you tell me please what can I do with this problem?
thanks a lot
Posts: 7
Hi everybody,
I got everything working with DRUPAL 6.4 ,GALLERY 6.x-1.x-dev(DRUPAL MODULE) and gallery-2.3-rc-1
Than I upgraded to Drupal 6.5 - everything was fine.
Now I did an upgrade to gallery-2.3-rc-2 and I got a problem.
The album-tree in the gallery-navigation of my drupal-site is no longer linking to the drupal-album-sites but to the gallery-album-sites. All other links work fine (block-image and other image/album-thumbnails).
For example a link in tree:
http://www.mysite.de/drupal/sites/all/gallery2/gallery/v/saison2002-03/
and the corresponding correct album-link (thumbnail):
http://www.mysite.de/drupal/?q=gallery&g2_itemId=1686
Are any resolutions out there?
Help would be appreciated!
PS: Had the same problem with the initial installations when I did hide a album with the hide-plugin of gallery2. So I turned off that plugin. But that's not causing the problem this time.
Posts: 7
Hm - strange.
The links are correct now. Can't think of anything I did to accomplish this.
I installed a new module (user-registration-notify) but that is not in any way related.
Only for the record: Till today the problem persisted on four different browsers (Firefox, Camino, Opera and Safari).
But now it works and sure I'm happy ;)
Posts: 5
Hello,
I have just installed Gallery 2.3 as an addition to a Drupal site I'm working on. Things looked like they were working great, until I tried to create an album as a user.
I have Gallery2 configured to create user albums when they are first accessed. When I login as a demo user to my Drupal site, and then hit the Gallery2 URL, Gallery2 comes up. Then, when I click on the "Your Album" link (upper right hand side), I get the security violation error: "Security Violation: the Action you Attempted is not permitted!"
If I make the administrator's album (root album?) writable by Registered Users, I get a different error: "Item not found".
I suppose that if I had the system create user albums when the user is created, that wouldn't work because the user creation is handled by drupal and not gallery2 - is that correct?
Thanks,
-josh
Posts: 3
Hi,
please, help me. I have a problem with czech letters in URL. Letters ě, š, č, ... are in my urls __ (2x '_') (http://vystavuj.cz/vystava/magnet/babi__ka.jpg) but it would be fine to be e, s, c ...
Is there any solution to do it in gallery UI?
thanks a lot
Posts: 1
Hello,
I faced the very same problem with URL rewrite on Gallery module in my Drupal installation. But finally, I got it right. Here's how I did it:
- just follow the instruction Don.K.Asok gave, with the url rewrite module enabled on both side (gallery2 site admin, and drupal gallery admin).
- test it. If things go correctly, you're so lucky!
- if you face a 'Page Not Found' page, but you're sure it's there, try this:
- open your Drupal's .htaccess file. Locate the url rewrite rules embedded by gallery module. Usually, they are located at the very top of the file.
- Check the "RewriteRule" lines. The correct rules for me are like this. You can change it according your installation configuration:
RewriteCond %{THE_REQUEST} /d/([0-9]+)-([0-9]+)/([^/?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/$
RewriteRule . /gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=%1&g2_serialNumber=%2&g2_fileName=%3 [QSA,L]
RewriteCond %{THE_REQUEST} /c/view/([0-9]+)\.html(\?.|\ .)
RewriteCond %{REQUEST_URI} !/$
RewriteRule . index.php?q=gallery&g2_view=comment.ShowAllComments&g2_itemId=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /c/add/([0-9]+)\.html(\?.|\ .)
RewriteCond %{REQUEST_URI} !/$
RewriteRule . index.php?q=gallery&g2_view=comment.AddComment&g2_itemId=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /rating/([^?/]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/$
RewriteRule . index.php?q=gallery&g2_view=rating.RatingAlbum&g2_limit=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /key/([^?/]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/$
RewriteRule . index.php?q=gallery&g2_view=keyalbum.KeywordAlbum&g2_keyword=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /v/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/$
RewriteRule . index.php?q=gallery&g2_path=%1 [QSA,L]
Hope it helps, and hope I don't ruin your day
Cheers
Edit:
Whoops, sorry, one more setting i forgot to tell. Upon installing, use 'gallery' as the embed URL instead of '/index.php?q=gallery'. Hope it helps
Posts: 7
I know this is old, but I struggled with this for quite some time. You MUST have drupal's clean url rewrite rules follow gallery's rules in the .htaccess file. The gallery rules must precede the drupal rules.
I hope this helps someone.
my drupal .htaccess