All links lead to gallery2

dkabal

Joined: 2007-11-02
Posts: 13
Posted: Fri, 2007-11-02 22:31

Using WP 2.3.1 and WPG2 3.0.2. Since I've upgraded to 2.3.1, many of the links on my site, which previously pointed to pages (they're still there), now point to gallery2:

Example:

http://david.kabal.org/wpg -> Gallery2
http://david.kabal.org/webcams -> Gallery2 (????)
http://david.kabal.org/wish-list -> Gallery2 (????)
http://david.kabal.org/about -> about me page....

It's like WPG2 or G2 have gone crazy redirecting everything to my gallery, but still some pages are OK. I've tried updating permalinks and revalidating, as well as turning url redirects on and off, to no avail.

Any advice or help is appreciated!

Using Gallery 2.2.1
Akismet 2.0.2
All in One SEO Pack 1.3.5.8
Enhanced WP-ContactForm 1.1
Maintenance Mode 3.2
Now Reading 4.4.1
Page Links To 1.4
Slashdigglicious 1.0.5
Sticky Menu 1.4
Tag Managing Thing beta 2
Tag Suggest Thing 1
Time Zone 2.3
WordPress Database Backup 2.1.4
WordPress Mobile Edition 2.0
WP-FileManager 1.2
WPG2 3.0.2
WP Navigation Tool (NAVT)

Thanks,
Dave

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Fri, 2007-11-02 23:42

I seen this issue back in the Beta / RC Days of WPG2 3.0, it is usually linked to some bad internal Wordpress Permalink rules.. Your about works fine so it leads me to believe it is being caused by the /w Gallery2 rewrite rule which would explain why all your w* pages are being redirect.

First test, turn off the Gallery2 rewrites from the WPG2 Rewrite Tab and see if your W* Pages come back..
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, WPG2 Downloads, WPG2 Documentation

 
dkabal

Joined: 2007-11-02
Posts: 13
Posted: Sat, 2007-11-03 02:13

Not yet. Gallery2 rewrites WERE off, and I turned them on and then off again. Then I turned permalinks on and off again. All failed to resolve the problem.

Thanks for pointing me at the w* problem though. It hadn't even occurred to me that only pages starting with letter w failed. One of my other plugins, filemanager, fails too, because the page it links to is: http://david.kabal.org/wp-admin/fm.php....

Any other ways to fix it? It seems to be an interaction between 3.2.1 and WPG 3.0.2, because I think 3.2 worked fine.

Cheers,
Dave

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Sat, 2007-11-03 04:56

Once you deactivate Wordpress Permalinks, Wordpress no longer has an internal rewrite array, thus are you sure when you turn off permalinks you cannot access those other pages?
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, WPG2 Downloads, WPG2 Documentation

 
dkabal

Joined: 2007-11-02
Posts: 13
Posted: Sat, 2007-11-03 12:40

Yer right. If I change from my permalink structure:

/%postname%.html

to the default permalink structure, w pages work properly. Unfortunately, this means that tens if not hundreds of internal links will stop working (links between posts use the format above)

Any other ideas?

(Silly question, why is this rewriting happening to gallery2 even when the rewrites are off?)

Thanks,
Dave

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Sat, 2007-11-03 23:50

That is what has me confused.. G2 rewrites are off thus the WPG2 plugin is not loading any G2 rewrites. It could be possible that somehow your Gallery2 rules which will still be in your .htaccess (in your Wordpress directory is still firing), this could be causing the links to fire.. I would suggest you clear this file, and update your permalinks again and see if this clears the issues..

Failing that I get you to do a dump of your internal WP rewrite array so I can examine what rules are firing.
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, WPG2 Downloads, WPG2 Documentation

 
dkabal

Joined: 2007-11-02
Posts: 13
Posted: Sun, 2007-11-04 15:39

OK, I deleted .htaccess, and then updated permalinks in WordPress, following by turning on WPG2 Gallery2 rewrites. It created a new .htaccess. Still,

http://david.kabal.org/webcams

Goes to my Gallery page. Interestingly enough, it takes a REALLY long time to do so.

I do not know how to "get a dump" of my internal WP rewrite array, but would be happy to do so.

Thanks for your time helping me on this! For the record, the WPG2 rewrites are awesome!

Cheers,
Dave

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Sun, 2007-11-04 23:17

Dave,

Grab this plugin -> http://www.dagondesign.com/articles/wordpress-internal-rewrite-viewer-plugin/ and cut and paste the rewrite rules..
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, WPG2 Downloads, WPG2 Documentation

 
capt_kirk

Joined: 2006-01-24
Posts: 492
Posted: Mon, 2007-11-05 19:21

Dave,

In addition to the internal WP rewrite array that Ozgreg is having you dump, could you also cut and paste the latest .htaccess from your WP root.

Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website

 
nocabt

Joined: 2007-05-25
Posts: 9
Posted: Tue, 2007-11-06 02:08

I'm having the same prob exactly. mysite.com/w pages direct to G2, and everything gets very slow. I tried clearing .htaccess, turning off WPG2 rewrites, and that didn't help. I tried the plugin, too, which worked after I turned off WPG2 rewrites...Any suggestions?

link for rewrites is here: http://thomasbacon.com/rewrites/

I'm not sure what to be looking for there,

thanks,

thomas

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Tue, 2007-11-06 02:38

Hiya Nocabt,

The issue is your webdev rule ([w(/[^?]*)?] > index.php?page_id=37&g2_controller=webdav.WebDav&g2_path=%1) is grabbing all w/ pages and redirecting them to Gallery2. Unfortunately this is simply the limitation of combining two sets of rewrite rules..

In my case I have renamed my WPG2 Page to Photos, and appended Photos to my Download Item and Slideshow Rules which should also work in your case..

Note: After changing the Gallery2 rewrite rules please also re-run the Gallery2 Rewrite Checking via the WPG2 -> Gallery2 rewrites tab.

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, WPG2 Downloads, WPG2 Documentation

 
capt_kirk

Joined: 2006-01-24
Posts: 492
Posted: Tue, 2007-11-06 02:41

I thought that we had fixed the rewrite rules on the last iteration so that the "w" rule for webdav wasn't greedy, but it looks like there are still some problems. I don't have access to my dev box tonight. I'll look at it tomorrow.

At first glance, the "w" rule should not be greedy as it is written in your rewrite rules. It should only trigger on w/?, w/some_directory? or w?, not other phrases starting with "w" like web/ or word/. But, I'll do some troubleshooting tomorrow.

In the meantime, can you try turning off the webdav rules and then see if rewrites are working in WPG2?

Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website

 
nocabt

Joined: 2007-05-25
Posts: 9
Posted: Tue, 2007-11-06 03:38

hi ozgreg and capt_kirk,

it worked to turn off webdav rewrites.

what's the donation link for wpg2? i'd like to make a (modest) contribution to such a supportive community.

thanks again,
thomas

 
dkabal

Joined: 2007-11-02
Posts: 13
Posted: Tue, 2007-12-04 02:19

Sorry for taking so long, went on an international business trip.

I would dump my rules, but the plugin doesn't work.

http://david.kabal.org/index.php/rewrites/

and

http://david.kabal.org/rewrites/

both fail with rewrites on... Does the webdav solution work universally?

Cheers,
Dave

 
scormeny

Joined: 2006-06-27
Posts: 68
Posted: Tue, 2007-12-04 20:06

Just wanted to send in a "me too" message. All of my wordpress posts that have post slugs that start with the letter "w" are showing up to users as my Gallery front page, not the post page.

This seems like a bug -- is it? Is a fix coming from the developers or are we mere mortals expected to work around this? Is this a WPG2 "problem" or a Gallery "problem" in the rewrite rules? Sorry, I'm a designer, not a programmer or a sysadmin, so I'd appreciate some bonehead-friendly guidance here.

Thanks very, very much.

I'm using Wordpress 2.3.1, WPG2 3.0.2, and here are my Gallery systems details:

Gallery version = 2.2.2 core 1.2.0.4
PHP version = 4.4.6 cgi
Webserver = Apache/1.3.37 (Unix) mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b
Database = mysqlt 4.1.22-standard-log, lock.system=flock
Toolkits = ArchiveUpload, Dcraw, Exif, Getid3, LinkItemToolkit, Thumbnail, Gd, ImageMagick, NetPBM
Acceleration = none, none
Operating system = Linux an.site5.com 2.6.9-55.0.6.ELsmp #1 SMP Tue Sep 4 21:36:00 EDT 2007 i686
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
Rows in GalleryAccessMap table = 22
Rows in GalleryAccessSubscriberMap table = 67
Rows in GalleryUser table = 3
Rows in GalleryItem table = 65
Rows in GalleryAlbumItem table = 2
Rows in GalleryCacheMap table = 0

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Tue, 2007-12-04 23:39

If you both have a look back into the thread, you will see the issue is caused by the Gallery2 webdav rule, as it is basically too greedy and will match any "w" pages. If you turn off webdav, your W* pages work fine (well they do for me). It is not a bug, it is simply the way Wordpress and Gallery2 rewrite rules interact. In a future release we add a prefix the Gallery2 rewrite rules with the WPG2 Post Slug to add an extra firewall around the Gallery2 rules to ensure Gallery2 rewrite rules can only fire in very narrowly defined situations.
___________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
scormeny

Joined: 2006-06-27
Posts: 68
Posted: Wed, 2007-12-05 22:31

Thanks so much for the prompt and thorough response, ozgreg.

I believe what you suggested doing (ie, "turn off WebDAV") entails:

1. going to Gallery's Site Admin -> Plugins, and then scrolling down to WebDAV and deactivating it.
2. afterwards, go into the Wordpress administrative area, deactivate the WPG2 plugin and then re-activate it and check all the settings panels. (it may be that you can just go to the WPG2 -> Gallery2 Rewrites panel, and not have to deactivate and reactivate the plugin, I'm not sure).

I did these two steps, and it seems to have fixed my problem. To be completely thorough in my answer: A post with the slug "w" would still rewrite to "wpg2," but a post slugged, for instance, "whichever", would come up properly in the browser.

Thank you for the advice, and best regards.

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Thu, 2007-12-06 00:34

Actually visiting the WPG2 Options -> G2 Rewrites would do the trick. I am hoping that adding the postslug as a prefix should correct this rule..
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
nocabt

Joined: 2007-05-25
Posts: 9
Posted: Fri, 2007-12-14 18:14

thanks for all the support on this. now, however, everytime i log in/out of WP it turns WPG2 rewrites "off" automatically. ideas?

thanks,
thomas

---------------------------
www.thomasbacon.com
---------------------------

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Sun, 2007-12-16 01:20

I never seem that nor can reproduce this.. The only time WPG2 would turn off rewrites if the WPG2 validation is performed which is only executed as part of visiting the WPG2 tab or the WP permalink options are change..
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
juanomatic

Joined: 2010-02-21
Posts: 1
Posted: Sun, 2010-02-21 17:26

Two years and change later. The WebDAV seems to cause this problem of redirecting all requests to Gallery2. Disabling seems to have fixed these problems.

Running Gallery 2.3.1 and WordPress 2.9.1 with WPG2 3.0.7

Thanks for solving this problem and posting this workaround.