WP 1.3+ Suggestion: Post Slug Locking and Required Titles

I’m prone to making suggestions about WordPress functionality, but I think these two are pretty important.

  1. Lock Post Slugs after posting.
    No one editing an already-published entry should be able to edit the post slug. The post slug is used to make the permalink in WP 1.2+, and I think that’s great functionality; however, if the post slug is edited the concept of the permalink is absolutely lost. The slug should be an enter-once-and-never-edit value and locked appropriately in the SQL and the scripting.
  2. Require titles for WP installs that use /%postname%/ in the cruft-free URL generation process.
    This goes along the same lines; if you fail to provide a title, you get an entry with the following URL: http://example.com/archives/YYYY/MM/DD//. Clicking this URL is the same as clicking http://example.com/archives/YYYY/MM/DD/, for all practical purposes. This also creates the potential for confusion if two posts are made on the same day with no post-slug. One could require a title to be written with simple Javascript, or a check could be done for a title in the publishing process, saving a draft and instructing the user to enter a title for unnamed entries.
    [An alternative resolution would be to use the entry number as the post slug in cases where the entry is untitled.]

Let’s face it: users sometimes forget how their software is actually used. I think the software can be reasonably and intelligently designed to provide good benefit for user and reader alike, and I think that it should be done.

Posted August 5th, 2004 in WordPress by Geof F. Morris.

10 comments:

  1. Rick:

    Did this come about from my lack of title on the post that tracked back over here?

  2. Geof F. Morris:

    Yes. I’ve been thinking about this for a while, and I had a free moment, so I posted it. You may call yourself a catalyst. [BTW, I edited the comment with the correct URL.]

  3. John Wilson:

    No, Geof, you’re wrong. I would say make it so you have to click a checkbox to edit the post slug (much like with the timestamp.) Yeah, yeah, permalinks shouldn’t change, but I’m writing crap on my weblog, not clay tablets. What if I make a spelling mistake in my post slug? Now I have to go in to the DB and screw around with SQL to fix it? Muck that! Plus, I bet way more people make spelling mistakes than know SQL.

    I’m not sure if I agree with you that titles should be *required*, per se, but something definately has to be done.

  4. Geof F. Morris:

    I can see your point, John, but until someone can come up with a solution that can point people using an outdated permalink at the right entry …

    :thinks:

    I can think of a way to do that. It would be a conditional thing—to check for on a permalink failure—but it could work. You’d create a linking table similar to wp_post2cat and keep a running list of all post slugs; every time one is pushed to the db, another record is made. That way, WP can then error check against that table and know the post ID and have mod_rewrite build the correct URL anyway.

    Seems like it would work, but that would be a pain to script, I bet.

    Thanks for challenging my assertion, John. I’d been vacillating on it, and I decided I’d take a stand and see if anyone said BS.

  5. Brad:

    What the heck is a “post slug” anyhow?

  6. Geof F. Morris:

    Check the link in the main entry, Brad. :)

  7. Brad:

    Oh. They’re those silly things. I never understood why you couldn’t use simple things like numbers, so the URL for the first post on 2004-08-05 would go /2004/08/05/1/ and the second would be /2004/08/05/2/ and so on, instead of having to resort to even longer URLs.

    I guess I just don’t see the advantage of putting text in there.

  8. Geof F. Morris:

    I think it’s a manner of preference and aesthetics. There are a few different schools of thought on the subject.

  9. Matt:

    The ID thing has been in the CVS since a few weeks after 1.2.

  10. John Wilson:

    Brad: well, the best reason I can see for putting text there is to f with google. ;)

Leave a response:

Note: This post is over 5 years old. You may want to check later in this blog to see if there is new information relevant to your comment.

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution.