Permalink changes after several minutes after saving post

I once created a script for a website of mine that looks at who (which author) saves the page. Based on this information, a script ensures that the page that this author creates is automatically saved under his main (parent) page.

However, after the publication of this page something strange happens with the permalink.

Example.

I am logged in as “Wesley” and if I save a page with the title “USB-Stick” the permalink should be as follows:

websiteurl.com/author-names/wesley/usb-stick/

But when I save the page the permalink is like this:

websiteurl.com/usb-stick/

When I try to go to this page I get a 404 because it doesnt exist.

The strange thing is that after 5/10 minutes the permalink is good and everything is fine.

But I get complains from everybody after publishing the page / post the link is not right and they get an 404.

Anybody has any idea how this happening and is there a way to solve this?

Read more here:: Permalink changes after several minutes after saving post

Leave a Reply

Your email address will not be published. Required fields are marked *