A Little Help Here

I love the “This Day In Leoville History” plug-in. On a blog like this with nearly seven years worth of posts it’s fun to go back in time. But you’ve probably noticed that a number of the entries are 404: file not found. They’re there, it’s just that they have punctuation in the title. For some reason WordPress can see the entries, but the links don’t work.
For example, today you’ll see “2001: I’ve been farked” – something about the apostrophe throws off the permalink. The actual page is there but I can’t link to it.

Anyone have any experience with this? Got a fix? Maybe some sort of MySQL script to encode the non-text entities? Or a change to the default encoding? I’d appreciate any help you could offer. It’s kinda bugging me.

UPDATE: Ben had the right idea. I was using “pretty” permalinks that had the post title in the link. I changed it to year/month/day/post_id and that fixed the problem. Thanks for all your solutions!!

14 Replies to “A Little Help Here”

  1. Leo I am using the 2 column version of Cutline, I recently installed the plugin you are referring to, on the first activation it caused errors when I updated my blog. I then uninstalled and tried again and it has worked.
    Also knowing your exact settings may help with the issue as well.

  2. Hi Leo -I think the problem goes beyond the “on this day” plugin.
    You’ll notice that links on your sitemap that link to those pages are also broken.
    Are you using the latest version of WordPress?
    I know the idea behind that style of permalink is for search engine reasons – but I don’t know, in your case, that you really need to worry about that. I use the regular ?p=# links on my blog and google picks my pages up very nicely… and I’m not even the World Renowned Master of All Things Digital like you.

  3. OK, Leo – possible fix.I was a slightly wrong in my last comment… I said that all links in your sitemap that use an apostrophe are messed up. In reality, only those before June of this year are messed up. I’m not sure if you upgraded around June or perhaps changed your permalink style in June or what… but WordPress ‘should’ take something like
    It’s a nice day!
    and turn it into
    its-a-nice-day
    You can see that it starts doing this as it should after June.
    So – from here on out you will be OK… but all those from before won’t be…
    You’re right that you can jump down a directory and see the post… so, a possible fix is to change a line on 91 of OnThisDay.php to:
    $subs[‘%permalink%’] = get_permalink(dirname($post->ID));
    I don’t have On This Day installed – nor do I have a blog that has posts from way back when… but the dirname() php function will basically move you up one directory…
    If it is successful, all the permalinks that OnThisDay.php retrieves will not extend to the final /post-title-here
    Instead, it will stop at the date (i.e. 2007/09/19/)
    But – it should work at that point.
    I apologize if it doesn’t – but my hunch is that it will. If it doesn’t, it has something to do with where the dirname() is wrapped.
    This, however, doesn’t address the issue with the old posts in the site map…. but hey, it’s a start!
    let me know if I can be any more help – alex.webjam@gmail.com

  4. Sorry Leo – I bet you are wishing you hadn’t asked for this help… you get dudes like me who end up to be completely annoying.
    I think the dirname() is wrapped in the wrong spot on my last comment –
    If it doesn’t work, this will.
    Change line 91 from
    $subs[‘%permalink%’] = get_permalink($post->ID);
    to
    $subs[‘%permalink%’] = dirname(get_permalink($post->ID));
    At any rate, I think this will do it.
    Sorry again for the barrage of comments.
    arrrrrrrrr…. its just not me day t’day.

  5. It looks like the link on the right column (http://leoville.com/blog/2001/09/19/i've_been_farked/) is different than the link in your blog entry (http://leoville.com/blog/2001/09/19).Other than that, looking at the source code, Vox held single quotes as dec 39/hex 27 and WordPress holds single quotes as dec 8217/hex 2019.
    Not that any of this actually answers your question but I have noticed problems with copying single quotes between applications.
    –Madeline

  6. I think the issue is that you changed your permalink settings at some point, if you go in and set them up to match the old post all your new posts should be updated and the old ones will work, I had a similar issue on my site when I went to “pretty permalinks”

  7. If you’re not using WP 2.2.3 – I wouldn’t upgrade just yet. 2.3 is due out next Monday, which may fix things – or it may break things that you’ve fixed 🙁

  8. No problem, if you decide you want to use the “pretty permalinks” I you have to edit the permissions on the wordpress files (I think it’s the wp-admin folder) and let it be edited by more than just you. For some reason WordPress doesn’t recognize it’s self editing itself 😛

  9. Hello, not sure this is the best place to ask this question…but I’m sure is the right persson…Leo I’ve been listening to your show for long time…right now I don’t have a chance anymore because of work, but I have a question: My computer is a Pentium4 plenty of memory, good hard drive (160) …recently had to replace video card (cause it failed), then I have a problem of the desktop shortcuts (or from the start menu the second row) I can not open any programs…for instance if I want to open my documents or my computer or control panel they won’t open…If I go to the Start menu and then to Run and then I browse and then I can open them that way only… even the internet explore won’t open from the desktop… I installed Panda security…thanks…hope you can give me a help…have a nice day.

Comments are closed.