WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] slug edit lost after Update.... (5 posts)

  1. dffmonolith
    Member
    Posted 5 years ago #

    I imported a bunch of posts from Typepad into WordPress, and a few post slugs needed editing. On a dozen posts, any attempts to edit the slugs are undone as soon as I hit Update Page. The slugs apparently change when I edit in the slug slot and hit Save, but it reverts as soon I hit the page Update.

    For example:

    /2005/12/magellan_explor-4.html should be /2005/12/magellan_explor.html

    I can remove the '-4' here, but the slug reverts upon updating.

    Is there some other way to do this so the results stick, or could it at least refuse to say that it Saved it if it didn't?

  2. stvwlf
    Member
    Posted 5 years ago #

    Hi

    In WP slugs must be unique across an entire site. When WP encounters a slug that is already in use by a post it tacks a sequence number on the end of the slug it comes up with, or the user has custom added

  3. dffmonolith
    Member
    Posted 5 years ago #

    Even though slugs normally get their own little namespaces with the year and month, they must still be unique?

    That seems like a needless restriction.... I guess I can map a small number of old URLs into the WP-generated version.

  4. stvwlf
    Member
    Posted 5 years ago #

    When one displays a post by itself on the single.php page, with the comments, there is no year and month involved if the permalink chosen is /%postname&/, which is how most of my sites are set up. If there were more than one post with the same postname (permalink), WP would not know which post to display when one typed in domain.com/mypostname/. Thus the restriction.

    Many sites use WP as a CMS not as a blog, to build a regular website, where there is no need or use for URL's with month and date in them.

  5. dffmonolith
    Member
    Posted 5 years ago #

    That makes sense, even though it would help in my case.

    Unfortunately, my situation of importing from Typepad forces me into this situation of duplicate slugs, so I'll just have to catch them as special cases in .htaccess.

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic