• shlema

    (@shlema)


    After a few frustrating experiences, I’ve just managed to reproduce a weird issue that only appears if I use Firefox.

    So, in my WP installation, posts receive URLs like this:
    https://url.com/category/34021/post-title/

    where 34021 is a unique post ID.

    What I’ve noticed is that if I create a few new posts at the same time, they get the same ID. After all these posts are saved, only the latest one survives, while the rest just vanish.

    Here’s a step-by-step reproduction:

    1. From WP admin interface, open multiple “Add new post” pages.
    2. Go to the first one, add a post title, switch to the post body and wait a few seconds until the assigned URL is displayed.
    3. Do the same for the other posts.

    If I do this in Firefox, each post gets the same ID. As a result, only the last saved post would be displayed later, with the rest vanishing into thin air.

    In Chrome, every post gets a new ID.

    Am I missing something here? Any ideas how to fix this (or just bite the bullet and switch to a Chromium-based browser), or where to start looking for a solution?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Joy

    (@joyously)

    You don’t mention what version of WP you are using, or which editor.
    I tried your steps, using WP both 5.5.3 and 5.6beta3 and the block editor, on Ubuntu with Firefox 82.
    Each time I click Add New in a new tab, the post ID increments.

    Do you have any plugins that may be affecting the REST API?
    Do you have any browser extensions in Firefox, maybe for privacy, that would affect the REST API?

    Thread Starter shlema

    (@shlema)

    Sorry, stupid of me indeed.

    It’s WordPress 5.4.2, Firefox 83.0b9 (64-bit), Windows 10 (10.0.19041.572).

    Thanks for mentioning the extensions! The problem seems to disappear in the Privacy mode (with no extensions running).

    The list of extensions is like this: https://i.imgur.com/vlw3I1w.png Can’t really see which one would cause the issue — will just try turning them off one by one, I guess.

    Thank you!

    Thread Starter shlema

    (@shlema)

    So, looks like it’s not as easy after all. Now the problem persists even in the privacy mode; when I create three posts, I see this (note the same number):

    View post on imgur.com

    View post on imgur.com

    View post on imgur.com

    Joy

    (@joyously)

    It looks like you have your permalinks set to category and then a number(is this category ID?) and then the post ID? The number on the end is different for each of your screenshots.

    Thread Starter shlema

    (@shlema)

    The number on the end is actually the post title — and the one before that is the actual ID. That is the same in all three posts —?and it appears that it’s not possible for two posts to have the same ID even if the titles are different.

    Joy

    (@joyously)

    It works in my tests, but I have a simple permalink structure. Perhaps your permalink structure is causing the problem. Do you have a plugin that is affecting that?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Firefox: Posts receive the same ID (and vanish)’ is closed to new replies.