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.


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

  2. 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 …


    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.

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

Comments are closed.