WordPress.org

Ready to get started?Download WordPress

Forums

Way to update post slug on Publish? (17 posts)

  1. JPigford
    Member
    Posted 9 years ago #

    Me and my writers frequently start drafts and give them "dummy" titles until we come up with something creative. The problem is that we sometimes forget to change the post slug when we publish so it get's posted with some generic slug. Is there a way to make it update the post slug on Publish?

  2. I'm not sure what you mean by "on Publish", but you can change the post slug both before and after you publish.

  3. Lorelle
    Member
    Posted 9 years ago #

    I have the same problem. I write the post and then publish it or put it in draft. Later, maybe even two weeks later, I edit it, change the title name to something more appropriate, and then Publish. Unfortunately, because the post-slug reference is way down on the Write Page, I forget to change the post-slug and my old title is now the Permalinks name for the post.

    I have to go back into edit mode and then change it, if I remember to pay attention. Just time consuming.

    I'd love to have it automatically update to whatever the title is, AND allow me to edit it. Kinda like the date where I could click a check box to allow editing.

  4. JPigford
    Member
    Posted 9 years ago #

    @macmanx: I know _how_ to change the post slug. It's just that I forgot. And the problem with forgetting is that people with RSS feed readers who's reader has already loaded the URL to the new article have the wrong URL loaded so they just get the 404 error page.

  5. Ryan Boren
    WordPress Dev
    Posted 9 years ago #

    This is by design. Permalinks wouldn't be very permanent if the slug changed. However, in the scenario JPigford describes, we shouldn't make the slug stick when saving drafts. Only once published should the slug stick. Changing the draft policy has been on the todo list forever, but has somehow never gotten done.

  6. MatthewRobertson
    Member
    Posted 9 years ago #

    I think I understand:

    John Smith posts a draft on WP.

    John Smith calls this draft "My Writing 2"

    The post slug automatically changes to "my-writing-2"

    A few weeks later, John Smith finished writing the draft and changes the TITLE.

    John Smith presses "Publish".

    The slug does not change when the title changes.

    Now, John Smith has to go back and manually change the slug.

    John Smith wants the slug to change when the title changes.

    Is this the problem?

  7. John Smith wants the slug to change when the title changes.

    At this time, it can't. Though, I'm sure someone could develop a plugin.

  8. JPigford
    Member
    Posted 9 years ago #

    @MatthewRobertson: Yes, you're understanding correctly and yes it is a problem because of the situation I described with the RSS feed readers.

  9. Lorelle
    Member
    Posted 9 years ago #

    It makes me bonkers having it NOT change when the post publishes from its draft status. In 1.2 the post-slug was at the top, but in 1.5 it is way down at the bottom and I often forget to manually fix this. If it was up at the top, I might remember better.

  10. Ryan Boren
    WordPress Dev
    Posted 9 years ago #

  11. Lorelle
    Member
    Posted 9 years ago #

    According to the bug report, this issue has been "resolved". Yes, no, solution is coming? I just had more problems with this again and I was just talking about it here....you would think I'd learn. Or at least remember something for more than 2 minutes.

  12. Jinsan
    Member
    Posted 9 years ago #

    I didn't even know this, and to be honest I've made so many posts I can't be bothered going back to fix it, but if this hasn't been fixed, and it has been on the to-do list forever, it seems quite an omission. If it is fixed, then is it fixed in 1.5 or in a nightly release?

    Ah well.

  13. Ryan Boren
    WordPress Dev
    Posted 9 years ago #

    1.5 is 1.5. We can't rewrite that history. It's fixed in 1.5.1. The very simple patch is linked to in the bug notes. Does no one ever scroll down? :-)

    Lot's of people can't be bothered. That's why these little things linger.

  14. Tahongawaka
    Member
    Posted 9 years ago #

    Instead of taking a moment to double check everything is to add a Redirectmatch 301 ... ... to your .htaccess for every slug that you change. Do that a few times and you won't soon forget to change the slug.

  15. Jinsan
    Member
    Posted 9 years ago #

    1.5 is 1.5. We can't rewrite that history. It's fixed in 1.5.1. The very simple patch is linked to in the bug notes. Does no one ever scroll down? :-)

    Lot's of people can't be bothered. That's why these little things linger.

    Bug notes? Patch? Is this in the new download? It's a little cryptic for me...

  16. moshu
    Member
    Posted 9 years ago #

    It means on the page linked above from mosquito
    http://mosquito.wordpress.org/view.php?id=531
    if you scroll down to the notes section there is a link pointing here
    http://trac.wordpress.org/changeset/2426
    where you can find the fix which will be "oficially" implemented in Wp 1.5.1 - till then you can manually update the file in your WP.
    It also means it is not in the present stable, official 1.5 download since that one was published on a certain date and all the bugfixes that come in time after that, will go into a new (1.5.1) bugfix release.
    At least this is how I understand.

  17. madolyn
    Member
    Posted 9 years ago #

    Related: it took me a while to figure out what Post Slug was for, because I couldn't find any reference to it in the documentation. Once I extrapolated its use upon editing a published post I hated it instantly. I do not want RSS feeds of any kind hanging off my site (because I need to know roughly who's reading, so I want them on my domain stats, not pulling my content remotely), and the whole reason I'm using %post_id% in fancy URLs is to avoid the post title being part of the permalink. Blogger did that and I hated it immensely. So now I enter a Slug that's like a keyword for my own reference but often has nothing to do with the title. I'm quite happy for it not to change, because if I can help it, nobody will ever see it anyway.
    (End of rant. Thank you for listening.)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.