push_type icon indicating copy to clipboard operation
push_type copied to clipboard

Shouldn't the slug be updated when editing the title?

Open erlingur opened this issue 7 years ago • 2 comments

I've just ran into an issue where a user was making changes to a ton of pages but didn't think about changing the slug as well so we had a lot of mismatches between the titles of pages and the URLs.

Could we make it so that the slug is always updated, not just when creating a new page? Or make it configurable if you want to keep the old behavior?

erlingur avatar Aug 12 '17 22:08 erlingur

I think the current behaviour is justified for a couple of reasons:

  1. Changing the permalink will break any inbound links and create 404s. In your case the user was surprised that the permalink didn't update automatically, but the opposite could occur and a user change the title of a page an inadvertently break inbound links. I think the latter scenario is a more damaging user experience.
  2. In some cases the user might customise the permalink for SEO reasons or simply to create prettier looking links. Therefore if/when a title is changed it might be frustrating if their customised permalink gets automatically updated.

Based on this I don't think the slug should always be automatically updated, it should be a user initiated event. However, I could see the value in some kind of UI element that gives the user a visual prompt that the title has changed and the slug may need to also be changed. Perhaps there could be a button that reveals itself for one click automatic updating.

aaronrussell avatar Aug 14 '17 20:08 aaronrussell

Yeah, I can get that. I think that your suggestion of a UI element prompting the user to maybe change the slug would be very helpful!

There is one thing also with the slug. If I manually edit the slug the input will allow me to enter any character I want. It should ideally do the same like if you are entering a title, filtering out unwanted characters, change a space to a - and etc.

erlingur avatar Aug 18 '17 12:08 erlingur