WP 2.1 Breakage
Published 17 years, 10 months pastSo I upgraded to WordPress 2.1, and it immediately broke stuff. For example, check out the RSS feed validator’s results for the summary version of my all-posts feed (full-content feed validation results; same problem). I think it’s just so cool how the software manages to get the sever to return a 404 for a file that’s clearly being served.
Of course, I only got to that point after commenting out the IfModule mod_rewrite.c
stuff WP apparently tacked onto the end of my .htaccess file. Before that, the above-referenced feed URLs just brought up the home page of the site while preserving the feed URL in the address bar. Keen.
Exactly the same progression of trouble has applied to the Distractions feed, too. At first the server (or WP) was filling in the home page, and now it returns the feed along with a 404 response.
I’ve also had the same problems with the main page of the post archive—at first, it redirected to the home page. Now it just returns a 404, although unlike the feeds, it doesn’t also create a full page to go with the 404. At least, I don’t think it does. I can’t see it, anyway. A shame, too, that it does its own thing rather than use the 404 page I already defined in the .htaccess file.
Anyone have any guesses at all as to what’s going wrong, and how I can get WP to stop throwing around inappropriate 404s? I assume this has something to do with my .htaccess file’s Rewrite rules—which worked just fine in WP 1.5.2, by the way—and the new error handling routines. Or maybe it’s just the new error routines.
Oh, and while we’re at it, what’s the story on the “new tabbed editor” that’s supposed to let you “switch between WYSIWYG and code editing instantly while writing a post” that was mentioned in the WP 2.1 announcement? Because I’ll be switched if I can find it.
Ah, the joys of upgrading…
Addendum: anyone know of a quick and simple way to just disable WordPress’ internal rewrite code, so I can go back to using my .htaccess file? That might solve the problem just as well as trying to hack my way around the problem with WP, and a lot more simply.
Comments (21)
About the “new tabbed editor” look at this image.
To tell the truth, the tabbed editor lets you switch between standard and advanced editor, not advanced and html editor :-(
Since WP 2.0, rewriting has been handled internally. The
mod_rewrite
section doesn’t do any heavy lifting anymore… it just passes it on to WordPress.For someone with their blog at their site root, it looks like this:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
If you have a long list of WP 1.5.2-generated rules, you should remove those and go with the version that looks like the example above (will be slightly different for you because you’re in a subdirectory).
You can only tab-switch between WYSIWYG editor and the regular editor if you have the WYSIWYG editor enabled in your user preferences (link in the upper-right corner of wp-admin).
Yeah, as Psuedo mentioned, the new editor is actually a big disappointment. For some reason, I got all excited when I first played with it, because it partially fixed an issue I’d always had with ASCII characters. Alas, all it does is switch between “no” HTML and “a little” html views. *sigh*
Unfortunately, I’m no help with mod_rewrite junk. That stuff terrifies me.
Mark: okay, but I have a lot of self-constructed rewrites that the default set listed above won’t cover. (For example, I differentiate between summary and full-content feeds by passing a URL parameter and rewriting; I also do my own rewriting for the “Distractions” stuff.) Does this mean I junk all the old rules and create new ones based on the new mod_rewrite.c block? If so, how? Like Matt, mod_rewrite terrifies me, not least because it seems to be the fast track to inexplicable 500 responses.
Eric, fortunately I’m now quite good with mod_rewrite stuff and regexp. Catch me on mail or ICQ(452626) if you need anything.
I think my previous comment got Akismetted or something. Anyway, i’m offering help with mod_rewrite stuff… catch me on… well, any electronic medium that you prefer. Except mail, (mt) has a hiccup in their mailservers at the moment.
One would think getting CSS3 to recommendation status would be easier than playing with mod_rewrite.c
Eric,
I got this through the WP-Hackers list. Do you still need help with this? Let me know if you do.
Chris
Oh, yeah, I definitely still need help. No movement since my last message to the list, so whatever I last said, it’s still a problem as I write this.
Eric, I’m still offering my help. Last 2 comments didn’t appear apparently.
Eric,
Could your MySQL version be a part of the trouble? I ask this only because I almost used WP 2.1 for a site I’m building at the moment and hosting at the Bend, only to find that I can’t because I have the wrong version of MySQL: (mt) on the shared servers only uses 3.23; I have to upgrade to the grid server for MySQL 4.
I, too, shudder at “free, painless” upgrades: they usually aren’t painless, aren’t much of an upgrade, and are generally expensive in terms of time spent correcting miscellaneous issues like this.
And (no intent to make this a kvetching session about WP), in a semi-related question (only related by virtue of the fact that I haven’t been able to get a response from Matt or the rest of the WP crew on this — and it’s been almost a month): did you ever figure out how to reverse the post order? I have a client that needs that, too…
Alex: what was the mail hiccup at (mt)? I didn’t notice anything…
I think mod_rewrite is the problem, along with the internal rewriting WP does, when handed the expressions from mod_rewrite.
Oh and the IMAP server at (mt) wasn’t accessible for an hour or so. It just returned “Lies!” which is an incredibly strange response for a mailserver Oo.
“Lies!”?
I didn’t see that at all. Are you on the grid, or the shared server?
I’m on the grid, which isn’t even a grid but rather a cluster. I’m really, really considering getting a (dv), the grid is slow, has outages and whatnot. Since it’s a huge cluster with a load balancer, not everyone will get the same results. That is, when a mail server goes down, it won’t affect all customers.
But I don’t want to hijack Erics post.
Eric: “anyone know of a quick and simple way to just disable WordPress” internal rewrite code, so I can go back to using my .htaccess file?”
I’m very sure that there is no simple way to do that.
wp-includes/rewrite.php defines a global singleton that handles all the rewriting. It’s for exampled called a few times from classes.php
Your best bet would be to look there. If you want, you can still contact me via mail/im/web and I’ll try to look into your specific problem.
I’ve also got my own slightly-lengthy set of rewrites, and have found two tricks that seem to help: first, add all of your own rules before WP’s, and second, use the
[L]
flag liberally in yourRewriteRule
s (e.g. RewriteRule ^archives/(.+)$ /blog/$1 [R=301,L] instead of just RewriteRule ^archives/(.+)$ /blog/$1 [R=301]).I just did a clean install of WP 2.1 on Textdrive, and I do not see the visual and code tabs (per PseudoTecnico’s image) in the post editor, either.
Your RSS feed finally works again. Firefox was not able to read the file for quite a while.
Re: “Because I”ll be switched if I can find it”. The tabbed view is not enabled as default – go to Users > Your Profile and check “Use the visual editor when writing”. This will display both the visual and code editors, and let you flip between them.
Thanks, everyone! The tabs are figured out (just had trouble finding the preference setting) and I did come up with a “fix” for the feeds and archive page. I’ll blog it in a few minutes.
HA! I’m glad someone else posted about the visual editor not being there as I was too lazy to investigate it myself. Turns out I disabled it so long ago that I forgot it was on the profile page.
Pingback ::
Programming and Designing for the Web » Blog upgrade
[…] There was pretty much no extra work involved. It just worked. I guess I’m lucky though as some others have been having […]