permalinks break when user changes username / page name
Yaodema
started a topic
8 months ago
saw someone change a page name recently, and only became aware of this because a post they made two hours prior stopped working as a link in places it had been shared off-site. looking on site at a friend's share of the post, it still went to the correct page, which had now clearly changed its name.
expected behavior of permalinks is that they should be permanent links. if the page has not been deleted, a link made to it a decade ago should still work today, let alone one made hours prior.
current behavior is that a change to a page name will cause a link to simply fail, as the page name no longer matches the link. the post number is apparently not used to correct this at all.
(relatedly, posts with a post number, a dash, and any following post slug (not just the one it was posted with) will open if everything else is correct, but if there is post number with no slug, the post won't open! we can probably solve both problems in one go, here.)
proposed solution: parse for the post number in the URL. if the post exists but the username is incorrect, do a redirect or rewrite of the URL to the correct username. then, display the post as normal.
Yaodema
saw someone change a page name recently, and only became aware of this because a post they made two hours prior stopped working as a link in places it had been shared off-site. looking on site at a friend's share of the post, it still went to the correct page, which had now clearly changed its name.
expected behavior of permalinks is that they should be permanent links. if the page has not been deleted, a link made to it a decade ago should still work today, let alone one made hours prior.
current behavior is that a change to a page name will cause a link to simply fail, as the page name no longer matches the link. the post number is apparently not used to correct this at all.
(relatedly, posts with a post number, a dash, and any following post slug (not just the one it was posted with) will open if everything else is correct, but if there is post number with no slug, the post won't open! we can probably solve both problems in one go, here.)
proposed solution: parse for the post number in the URL. if the post exists but the username is incorrect, do a redirect or rewrite of the URL to the correct username. then, display the post as normal.