Latest WP and Latest Gallery, not sure what is wrong
|
scottkct
Joined: 2007-05-20
Posts: 9 |
Posted: Sat, 2008-05-03 22:54
|
|
my blog is at http://www.karienadscott.com/blog With the latest version of WPG2, the embeded gallery now wants to go to http://www.karienadscott.com/blog/gallery/. This URL works but all links on WPG2 embedded images go to http://www.karienadscott.com/blog/v/.... And also my individual blog entries nor also pull up the gallery. It appears that if I put anything after /blog/ it pulls up the gallery when I would expect a 404. This appears to be stepping on WP. I would like it back to my old settings when WPG2 images link to the gallery outside WP. I've tried disabling the Gallery2 Rewrite Plugin but it does nothing. |
|
| Login or register to post comments |

Posts: 1022
scottkct
What you are describing is a classic rewrite issue and has nothing to do with the new version of WPG2, unfortunately none of your links work as they all return 404 domain not found, so I cannot see this behaviour first hand. I would start with the basics
A) I would disable the Gallery2 rewrite plugin
B) Ensure the Gallery2 rewrite rules have been deleted from your .htaccess that will either be in your Wordpress or Root Directory depending on your configuration..
Then see what the links are doing.. Also I made it is pretty clear why the we cannot provide the setting to directly link to Gallery2 in a few other threads, this is not going to happen so I am not going to cover this ground again..
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo
Posts: 9
Ugh, wrote the URL wrong the first time and copy/pasted the rest.
WP - http://www.karieandscott.com/blog/
G2 - http://www.karieandscott.com/gallery/
G2 Embedded - http://www.karieandscott.com/blog/gallery/
Response to your suggestions
A) I am unable to disabled the Rewrite Plugin. I select Off and update and it goes to Off (Safe). My WPG2 links still go to /blog/v/.... and my blog permalinks have been hijacked by G2.
B) There are no Gallery 2 rewrite rules in my .htaccess file. My .htaccess was never updated after the WPG2 upgrade. I don't understand how it can step on my blog permalinks with these rewrite rules when they used to work fine. It was only after the upgrade that all permalinks now to go G2.
Here are the rules in my .htaccess right now.
~~~~~~~~~~~~~~~~
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.+) index.php/$1 [L,QSA]
~~~~~~~~~~~~~~~~
Another thing that doesn't make sense regardless of A and B is that the links on my images that are supposed to go to just the image in G2 aren't right. They go to /blog/v/... and it should go to the embedded G2 url at /blog/gallery/v/...
Sorry for not picking up your response on the other forum posts on linking directly to the standalone gallery. When I search the forums, I'm looking for answers specifically to my problem and couldn't find anything, therefor never saw any of your responses. Could be helpful to have it in the docs rather than the forums.
Attached are 2 screencaps of my settings
Posts: 9
More oddness I just found.
When I view the embedded G2 none of the links are right.
http://www.karieandscott.com/blog/gallery
All links in the embedded gallery goes to /blog/... instead of /blog/gallery/...
Could it be an issues with my G2 URL Rewrite rules? They havn't change either and I even deleted my .htaccess in my /gallery/ dir and reactivated URL Rewrite to recreate it.
I tried to modify the baseUri in G2 config but that made things worse..
It seems the root of my problem is the embeded gallery isn't working at all. When viewing the embedded gallery I select my first album and it takes me out of /blog/gallery/... and into just /blog/... If I manually add "gallery" back into the URL so that it goes to what I expect the embedded G2 album url to be it stays at the G2 hompage. So even if the URLs were right, the gallery still wouldn't work.
Posts: 1022
Hmm I think you picked up the issue in your Point B) no Gallery2 rewrite rules in your Wordpress .htaccess..
Can I please get you to install the excellent BTEV Viewer activate it and ENABLE the WPG2 Gallery2 Rewrite..
You will see in the Event Log a number of WPG2 events I am looking for the following two values..
WPG2 SET G2 REWRITE LOCATION
WPG2 SET G2 REWRITE HTACCESS
Thanks
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo
Posts: 9
Alright, I think I've narrowed down the problem. I can get WPG2 and G2 to work only when I have the WPG2 Rewrite Module off and URL Rewrite and Permalinks off in G2. As soon as I enable everything, I'm back at square 1.
I suspect there seems to be an issues with the .htaccess the WPG2 rewrite module is using. An additional problem I have is if I have my .htaccess there with my old WP rules for clean permalinks, activating the Rewrite Module doesn't change the blog .htaccess. The Rewrite Module options page then becomes blank. I have to reactivate the WPG2 plugin in order to get back to the Rewrite Module options. If before activating the rewrite module, I remove my .htaccess, the module creates the .htaccess with it rules. The problem with this is it doesn't have my one rule I need for clean blog permalinks which is
RewriteRule (.+) index.php/$1 [L,QSA]
Adding this doesn't solve anything, in fact it takes me back to my problem when I first posted this. To get it to work, I've had to reactivate WPG2, not touch WPG2 Rewrite Module (left off), and deactivate URL Rewrite and Permalinks in G2. This gives me the functionality I would expect from the new WPG2 embedded architecture.
The problem now is I don't have Permalinks in G2. This is better than my whole blog not working but I have my gallery sitemapped in Google with permalinks. In addition to having ugly URLs which I don't like.
Any idea what I can do to get permalinks back into my gallery?
Posts: 1022
Hiya scottkct,
Lets back up a few steps here because your last post is a tad confusing to me.. Have you installed the BTEV plugin so you can get a debug log to me?
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo
Posts: 9
Sorry I jumped the gun. I thought I was on to something. Attached is the event logs from my last WPG2 plugin activation and WPG2 Rewrite Module Activations.
The interesting thing is that I have now reactivated the plugin/module many times and I've experienced different results as far as my original .htaccess in my /blog dir. Sometimes nothing happens (the orig .htaccess is untouched), sometimes it adds a the WPG2 rewrite code but before my original code creating 2 separate IF statement one after the other, and then just now the my existing code was completely replaced with the WPG2 code.
One thing I noticed is that when I activate the Rewrite Module, my URL Rewrite and Permalink plugins in G2 get deactivated. Activating them does nothing to solve the problem, just fixes permalinks in the standalone gallery.
Posts: 9
Also here are the various .htaccess files
G2_htaccess.txt - used on standalone G2 for URL Rewrite and Permalinks enabled
WP_htaccess.txt - original from WP for clean permalinks
Custom Structure - "/%postname%"
WPG2_htaccess.txt - what is created when WPG2 Rewrite Module is enabled
Posts: 1022
scottkct,
I think we can rule out any WPG2 bug, because from what I see in the WPG2 Debug Log the WPG2 plugin is correctly identifying the location of Wordpress and instructing Gallery2 Rewrite Module to write the file in what appears to be the correct location inside your blog directory..
From your posted behaviour, it is very possible that Gallery2 is tripping over your wordpress .htaccess for some reason or another.. What it should be constructing is Gallery2 Rewrite Rules First, followed by your Wordpress Rewrite Rules Second in your blog directory from your posts that is clearly not happening..
Your .htaccess in your wordpress directory should look like what I posted below.. It would be an interesting experiment to update your wordpress .htaccess file to look like below..
Please note your custom structure is not unique and the Wordpress Codex warns you against using this structure..
# BEGIN Url Rewrite section
# (Automatically generated. Do not edit this section)
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php
RewriteCond %{REQUEST_URI} !/blog/gallery$
RewriteRule . - [L]
RewriteCond %{HTTP:Authorization} (.+)
RewriteCond %{QUERY_STRING} !g2_authorization=
RewriteRule . %{REQUEST_URI}?g2_authorization=%1 [QSA]
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule . http://www.oochie.com/gallery2/modules/webdav/data/options/ [QSA,L]
RewriteCond %{THE_REQUEST} /blog/sitemap\.xml(\?.|\ .)
RewriteCond %{REQUEST_URI} !/blog/gallery$
RewriteRule . /blog/gallery?g2_view=sitemap.Sitemap [QSA,L]
RewriteCond %{THE_REQUEST} /blog/v/([^?]+)\.davmount(\?.|\ .)
RewriteCond %{REQUEST_URI} !/blog/gallery$
RewriteRule . /blog/gallery?g2_view=webdav.DownloadDavMount&g2_path=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /blog/w(/[^?]*)?(\?.|\ .)
RewriteCond %{REQUEST_URI} !/blog/gallery$
RewriteRule . /blog/gallery?g2_controller=webdav.WebDav&g2_path=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /blog/v/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/blog/gallery$
RewriteRule . /blog/gallery?g2_path=%1 [QSA,L]
RewriteCond %{THE_REQUEST} /blog/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/blog/gallery$
RewriteRule . /blog/gallery?g2_view=rewrite.FileNotFound [QSA,L]
</IfModule>
# END Url Rewrite section
# BEGIN Url Rewrite section
# (Automatically generated. Do not edit this section)
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.+) index.php/$1 [L,QSA]
</IfModule>
# END Url Rewrite section
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo