meyerweb.com

Skip to: site navigation/presentation
Skip to: Thoughts From Eric

WP 2.1 Breakage

So 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.

21 Responses»

    • #1
    • Comment
    • Mon 29 Jan 2007
    • 0213
    PseudoTecnico wrote in to say...

    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 :-(

    • #2
    • Comment
    • Mon 29 Jan 2007
    • 0420
    Mark Jaquith wrote in to say...

    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).

    • #3
    • Comment
    • Mon 29 Jan 2007
    • 0905
    Matt Dawson wrote in to say...

    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.

    • #4
    • Comment
    • Mon 29 Jan 2007
    • 1024
    Eric Meyer wrote in to say...

    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.

    • #5
    • Comment
    • Mon 29 Jan 2007
    • 1506
    Alexander Graf wrote in to say...

    Eric, fortunately I’m now quite good with mod_rewrite stuff and regexp. Catch me on mail or ICQ(452626) if you need anything.

    • #6
    • Comment
    • Mon 29 Jan 2007
    • 1545
    Alexander Graf wrote in to say...

    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.

    • #7
    • Comment
    • Mon 29 Jan 2007
    • 1737
    Jeff wrote in to say...

    One would think getting CSS3 to recommendation status would be easier than playing with mod_rewrite.c

    • #8
    • Comment
    • Mon 29 Jan 2007
    • 1939
    Chris Poteet wrote in to say...

    Eric,

    I got this through the WP-Hackers list. Do you still need help with this? Let me know if you do.

    Chris

    • #9
    • Comment
    • Mon 29 Jan 2007
    • 2054
    Eric Meyer wrote in to say...

    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.

    • #10
    • Comment
    • Tue 30 Jan 2007
    • 0235
    Alexander Graf wrote in to say...

    Eric, I’m still offering my help. Last 2 comments didn’t appear apparently.

    • #11
    • Comment
    • Tue 30 Jan 2007
    • 1328
    Will Kessel wrote in to say...

    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…

    • #12
    • Comment
    • Tue 30 Jan 2007
    • 1556
    Alexander Graf wrote in to say...

    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.

    • #13
    • Comment
    • Wed 31 Jan 2007
    • 0124
    Will Kessel wrote in to say...

    “Lies!”?

    I didn’t see that at all. Are you on the grid, or the shared server?

    • #14
    • Comment
    • Wed 31 Jan 2007
    • 0442
    Alexander Graf wrote in to say...

    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.

    • #15
    • Comment
    • Wed 31 Jan 2007
    • 2157
    Peter J. wrote in to say...

    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 your RewriteRules (e.g. RewriteRule ^archives/(.+)$ /blog/$1 [R=301,L] instead of just RewriteRule ^archives/(.+)$ /blog/$1 [R=301]).

    • #16
    • Comment
    • Thu 1 Feb 2007
    • 0239
    Colin Scroggins wrote in to say...

    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.

    • #17
    • Comment
    • Thu 1 Feb 2007
    • 0328
    Oliver wrote in to say...

    Your RSS feed finally works again. Firefox was not able to read the file for quite a while.

    • #18
    • Comment
    • Thu 1 Feb 2007
    • 0431
    Oli wrote in to say...

    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.

    • #19
    • Comment
    • Thu 1 Feb 2007
    • 1018
    Eric Meyer wrote in to say...

    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.

    • #20
    • Comment
    • Thu 1 Feb 2007
    • 1319
    Thom wrote in to say...

    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.

    • #21
    • Pingback
    • Fri 2 Feb 2007
    • 1456
    Received from 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 [...]

Leave a Comment

Line and paragraph breaks automatic, e-mail address required but never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



Remember to encode character entities if you're posting markup examples! Management reserves the right to edit or remove any comment—especially those that are abusive, irrelevant to the topic at hand, or made by anonymous posters—although honestly, most edits are a matter of fixing mangled markup. Thus the note about encoding your entities. If you're satisfied with what you've written, then go ahead...


January 2007
SMTWTFS
December February
 123456
78910111213
14151617181920
21222324252627
28293031  

Sidestep

Feeds

Extras