Keep the URL of live pages stable when the title changes#1443
Open
jeroenson wants to merge 2 commits into
Open
Keep the URL of live pages stable when the title changes#1443jeroenson wants to merge 2 commits into
jeroenson wants to merge 2 commits into
Conversation
Contributor
|
I don't like it as an option |
Author
|
Fair enough. I removed the option and made it the default. Drafts keep following the title, so the only change is that a live page no longer moves to a new URL when someone edits its title. Changing the URL through url_title works like before, including the 301. The whole test suite passes with the new default. If you know a case where you actually want a title edit to silently move a live page, I'd like to hear it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
By default the slug of a page follows its title as long as url_title is empty. That is great while building a site, but on a live page it means an innocent title edit quietly moves the page to a new URL and leaves a 301 behind. Our content team hits this every time they freshen up titles (changing a year number for example), and over time that builds redirect chains and costs link equity.
With this change the slug of a live page is locked on its next save: the current slug is written to url_title, so title edits no longer move the page. The URL can still be changed deliberately by editing url_title, which creates the usual 301. Draft pages keep following the title.
This does change behavior for existing sites, so it deserves a line in the release notes.