Post slug having number attached

This topic contains 9 replies, has 3 voices, and was last updated by  Alex Rollin 5 years, 9 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #439429

    Travis
    Free User
    Post count: 7

    I have a post who’s slug is having “-1” attached to it. No other post shares the same slug.

    There was one, which got deleted when I deleted a location, and I think the record of that still exists somewhere. How can I fix this?

    #439433

    Kor
    Moderator
    Post count: 16516

    Hi Travis,

    Thanks for your reply. Kindly refer to this section of the documentation and see if it helps. https://wpgeodirectory.com/docs/faqs/why-do-my-locations-get-a-1-at-the-end/

    Thanks!

    #439472

    Travis
    Free User
    Post count: 7

    Hi Kor! That solves it, until I go to edit the place in wp-admin. Then it reverts back to the “-1” (not until I update the page). Even though searching the whole db for the “-1” version returns no results.

    However, if I leave it after editing the database, it stays fine. Why?

    #439475

    Alex Rollin
    Moderator
    Post count: 27815

    WP will clean it up if the slugs are for different items, like a page AND a category. The instructions say “except the one you changed to -1” because one of them still has to be -1 unless you delete it completely and remove it from the trash.

    #439478

    Travis
    Free User
    Post count: 7

    Yes, sorry that’s what I meant. There’s only one “-1” record left, which is the old one I renamed. Except that, there are no other records in the db.

    It was an attachment with post_name “slug” which I changed to “slug-1”

    #439509

    Alex Rollin
    Moderator
    Post count: 27815

    Then it reverts back to the “-1” (not until I update the page).

    So, after this happens, what do you find when you search?

    Please share your site URL and WP Admin credentials, plus a link to the post so we can take a look.

    #439524

    Travis
    Free User
    Post count: 7
    This reply has been marked as private.
    #439546

    Alex Rollin
    Moderator
    Post count: 27815

    You do not have BSR installed. How are you checking for the values in the DB?

    #439557

    Travis
    Free User
    Post count: 7

    I was querying the db directly.

    Problem is now solved though. I created a post with the same slug (which it let me for some reason); and deleting that permanently fixed it and made it available for use.

    #439564

    Alex Rollin
    Moderator
    Post count: 27815

    Ah ha, good news. Glad you found a way to make it work.

Viewing 10 posts - 1 through 10 (of 10 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket