A client reached out to me this week after they noticed a problem with WordPress hyperlinks. They published an article and instead of providing a hyperlink with something like
http :// yoursite.com/year/month/title/
WordPress instead generated a hyperlink that looked like
http :// yoursite.com/year/month/80023/
They initially worried that maybe the site had been hacked, which was not the case. I wondered based on their initial description if the Permalink settings in the WordPress admin setup had been changed from postname to post id, but that had not happened either.
I logged in and created a post with the title of test and test in the content block, hit publish and it created a hyperlink of
http :// yoursite.com/year/month/test/
Everything seemed to work just fine. I was just writing it off, when I remembered that sometimes WordPress needs to create a filler url.
This can happen in two scenarios that I am aware of. In one scenario, WordPress autosaves the work if a browser or browser tab crashes. If there was no title entered into the title field at the time of the crash, WordPress creates the hyperlink with what would have been the next post id number.
In the second similar scenario, if a person writes a blog article and again does not enter a title into the title field before they hit either the Save Draft button or the Publish button, it too will save or create the post using the Post ID, and that is where the hyperlink with a number error often comes from.
Have you seen other scenarios where this comes into play?