I have an old post set to private. When I visit it in a browser, Network in DevTools shows that it is endlessly redirecting to itself. I have switched off my redirect plugin, that didn't help.
I wondered if it was a canonical redirect, so I tried this in functions.php:
No success, so I tried:
And, that has fixed it. However, I then checked for old slugs:
SELECT * FROM `wp_postmeta` WHERE `meta_key` = '_wp_old_slug'
There is no entry with the relevant post_ID?! How do I fix this one page?