Opened 9 years ago
Closed 9 years ago
#35420 closed defect (bug) (wontfix)
Inconsistent slug behaviour add/edit terms
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Taxonomy | Keywords: | |
Focuses: | Cc: |
Description
When I add a term with a slug that is already taken, the slug will be altered with a suffix, which is nice.
But when I edit an existing term with a slug that is already taken it will result in some kind of 'validation-error' (The slug “term-taken” is already in use by another term).
I would expect that an existing slug will be altered with a new suffix, just like it's done for posts.
Change History (2)
Note: See
TracTickets for help on using
tickets.
Hi @andizer - Thanks for the ticket.
Term slugs are used to generate URLs, for things like taxonomy archives. Once these URLs have become public, changing the slugs will break existing permalinks. You can choose to do this manually (by entering
slug-2
yourself), but it's not something we'd want to do automatically.The case of posts is different, because we have infrastructure in place that supports rerouting of old slugs. See
wp_old_slug_redirect()
andwp_check_for_changed_slugs()
. Now that we have termmeta (as of 4.4), it's conceivable that we could build something similar for terms. But in the absence of this new system, we can't blindly change existing slugs.I'm going to close this ticket as maybelater on this basis, but if you or someone else wants to work on the changed-term-slug system, feel free to reopen with some ideas :)