WordPress pages become corrupted after the category is changed then changed back
Steps to reproduce:
1. Navigate to wordpress
2. Load an existing page
3. I changed the category for the page which was currently 'Safety and security' to 'Buying' and updated the page
4. Following the update, the URL of the page changed to show buying in the URL instead of safety-and-security
This meant the original URL would no longer work as it had been replaced buy the new URL with buying.
5. However when I edited the page again and changed the category from 'Buying' back to 'Safety and security' and updated the page the following happened:
* Neither URL either with buying or safety-and-security would work
* The article was still editable in wordpress so for our editorial team it looks like nothing it wrong.
If you navigate to the URL using the internal URL which is shown when looking at the article in wordpress which includes the safety-and-security in the URL it redirected away from the safety-and-security URL and loaded the page under the internal URL but with buying in the URL.
This just confused me as during the last edit I had updated it back to Safety and Security so I would expect it to load the page as that. But for some reason WP still sees it as a buying page even though all the category and tags suggest it is safety and security.