WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 9 months ago

Last modified 9 months ago

#11156 closed defect (bug) (invalid)

Duplicate tag created if tag name contains ampersand

Reported by: sillybean Owned by: filosofo
Milestone: Priority: normal
Severity: normal Version: 2.9
Component: Taxonomy Keywords: needs-patch
Focuses: Cc:

Description

This is undoubtedly an edge case, but here's what happened:

  1. I created a tag with a long name that contained an ampersand. Gave it a shorter slug than the one WP generated.
  1. Tagged some posts.
  1. While the server was running slow, the autocomplete never came up, and I tagged another post by cutting and pasting the tag name from another screen.

That resulted in a new tag being created with a longer WP-generated slug, instead of the post getting tagged with my older existing tag.

This happened a few times (the server in question is REALLY slow), and I finally realized that the only tags that were incorrectly duplicated were the ones with ampersands.

Change History (5)

comment:1 dd324 years ago

  • Keywords needs-patch added; tags autocomplete ajax removed
  • Milestone changed from Unassigned to 3.1

This might be caused by "Test & Slug" being stored as "Test & Slug" in the terms table.

However, There is another side to this story.

Create a tag as such:

Name: Some Tag
Slug: st

Attempt to create another tag as such:

Name: Some Tag
Slug: 

Result will be a second tag created with 'some-tag' as the slug, as the name is ignored in the comparison, its only checked to see if another term exists matching that slug (be it provided, or automatically generated)

That testing is done from the Manage -> Tags screen, but its most likely also the underlying cause of the Tag additions.

comment:2 dd324 years ago

There is some issues with the Suggest and & due to & The search doesn't abide the same escaping. See #13992.

comment:3 nacin3 years ago

  • Milestone changed from Awaiting Triage to Future Release

comment:4 aaronholbrook9 months ago

  • Resolution set to invalid
  • Status changed from new to closed

Cannot reproduce and dd32's steps to create a secondary tag with a missing tag no longer applies.

comment:5 helen9 months ago

  • Milestone Future Release deleted
Note: See TracTickets for help on using tickets.