• Resolved mrwweb

    (@mrwweb)


    I’m working on a site I just inherited. The main user didn’t understand how to use parent-child relationships to make hierarchical URLs. Therefore, instead of making her new page with the slug ‘beta’ a child of ‘alpha,’ she entered ‘alpha/beta’ into the slug field for the child page (‘beta’).

    That slug didn’t work, but it seemed to create a duplicate slug for the ‘alpha’ page located at ‘…org/alpha/beta.’ Going to /alpha and /alpha/beta takes you to the same page and trying to rename the child slug to ‘beta’ results in that slug being ‘beta-2.’

    I don’t understand that much about the WordPress permalink structure and how it handles redirects, but it seems that it must have created a duplicate slug for the ‘alpha’ page above that I have no access to.

    I tried going to the Permalinks page to see if that would reset the rewrite rules, but the problem persists. I also ruled out a different page already having the ‘beta’ slug. The trash is empty.

    Any help would be really appreciated.

Viewing 8 replies - 1 through 8 (of 8 total)
  • try editing the actual permalink
    edit post in question
    above editor is editable permalink field
    change permalink and save it
    save post
    test

    Thread Starter mrwweb

    (@mrwweb)

    Yeah, I’ve tried updating both posts.

    To be clear, at present we have:
    Post with slug ‘alpha’ that is accessible on the site about both …org/alpha and …org/alpha/beta.
    Child of ‘alpha’ with the slug ‘beta-2.’ This is the post that someone entered in ‘alpha/beta’ into the slug field and seemed to cause the problem.

    Thread Starter mrwweb

    (@mrwweb)

    Update to this bug. Now I’m even more confused.

    There’s another page we’ll call ‘gamma’ that is also a child of ‘alpha’.

    At present, I can see that it’s located at /alpha/gamma. HOWEVER, if I go into update the ‘gamma’ page, I can see that it’s slug shows as ‘gamma-2.’

    Luckily I caught this before saving it as ‘gamma-2,’ but this seems like a new piece of the puzzle.

    the -2 gets added when a post has been deleted but is still in the trash
    try emptying the post trash
    https://codex.www.ads-software.com/Trash_status

    Thread Starter mrwweb

    (@mrwweb)

    I’m aware of that and that was one of the first things I tried. There was never a page in the trash causing the issue.

    Thread Starter mrwweb

    (@mrwweb)

    Another update to add to the confusion:

    As I said earlier, when I go to /alpha/beta, I am taken to the same page as just /alpha.

    I watched the HTTP headers for that server request, and it sent back 200 (i.e. everything is ok, no redirect).

    It really seems that somehow, WordPress thinks that /alpha has two slugs.

    I’ve looked through the WordPress database and can’t find anywhere where this could be happening.

    Thread Starter mrwweb

    (@mrwweb)

    This is resolved. See https://www.ads-software.com/support/topic/problem-with-permalinks-and-pages-adds?replies=2 and note below.

    For the purposes of clarity, I used alpha/beta/gamma as examples. However, one of the slugs (the child) was only a number (e.g. “86”). This site had just been upgraded from a VERY old version of WordPress. I guess this hadn’t caused problems before, but the purely numeric slug now causes problems.

    Not sure how to deal with this, but at least I know the problem now…

    Samuel B, thanks for your help. I really appreciate it and you didn’t have a chance due to my choice of examples.

    hey – just glad you found it
    now I can stop looking :>)

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Errant duplicate slug for a single post? Weird problem.’ is closed to new replies.