[wp-trac] [WordPress Trac] #37009: When two different tags generate the same slug, the second tag is rejected
WordPress Trac
noreply at wordpress.org
Fri Jun 3 00:59:05 UTC 2016
#37009: When two different tags generate the same slug, the second tag is rejected
------------------------------+-----------------------------
Reporter: michael.costanza | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 4.5.2
Severity: normal | Keywords:
Focuses: |
------------------------------+-----------------------------
When two different tags result in the same slug, instead of the slugs
being made unique the second tag is discarded and treated as if it were
the first. Here's an example:
1) Add the tag "$4 gas" to a post, via the post edit screen.
2) Update the post.
3) Verify that the term "$4 gas" is added to the wp_terms table with
"4-gas" as its slug and that the tag is displayed with the post on the
edit screen.
4) Add the tag "#4 gas" (or "#4-gas or similar) to the post, via the post
edit screen.
5) Update the post.
6) Note that the term "#4 gas" has not been added to the wp_terms table
and the tag is not displayed with the post.
Also, if you try to add "#4 gas" to any post, you'll get "$4 gas" instead.
(I realize this example sounds silly, but with the many tags based on
words in different languages or brands, unique tags can result in the same
slug.)
It seems that what should happen in this case is that if the original tags
are actually unique, the second one should get a unique slug (with
something like '-2' appended).
I'm using WordPress 4.5.2 with all plug-ins deactivated.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37009>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list