Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#6545 closed defect (bug) (duplicate)

When you have a custom tag slug, it will duplicate tags

Reported by: free8 Owned by:
Milestone: Priority: high
Severity: normal Version: 2.5
Component: General Keywords: tag slug
Focuses: Cc:


When you have a custom english tag slug that is different from the chinese tag name, you will have duplicate tags after saving a post with the tag.

tag name is 测试, tag slug is test
write a post, add a tag "测试" and hit the save button
Go back to Manage -> Tags, you will find two "测试" tags, one slug is "test"(0 post, 404 error, url:http://test.tintin.host7.meyu.net/tag/test), another slug is "测试"(1 post, normal, url:http://test.tintin.host7.meyu.net/tag/测试).

Please help me. Thanks!

Change History (11)

#1 @mtekk
14 years ago

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

Closing as duplicate of #6313

#2 @Nazgul
14 years ago

  • Milestone 2.7 deleted

#3 @free8
14 years ago

  • Resolution duplicate deleted
  • Status changed from closed to reopened

Please test it, 6545 and 6313 are different. Thank you!

#4 @free8
14 years ago

#6313: English tag name no problem, and Chinese tag name errors.

#5 @mtekk
14 years ago

  • Resolution set to duplicate
  • Status changed from reopened to closed

From what you reported the error is caused by the same thing. It's a problem with a tag name having two different slugs when you change the slug for the tag. That is the exact same problem as #6313. It is a problem regardless of language. I tried it, its the same as far as I can tell.

#6 @free8
14 years ago

username:admin password:123654
Please edit and save this post.
Go back to Manage -> Tags, you will find two "测试" tags.

#7 @mtekk
14 years ago

Ok,I see what you're getting. And from rereading this and #6313, I'm sure the same behavior of WordPress is causing both bugs. This is what I did. I don't know UTF-8 characters, so I copied and pasted yours, I made a tag under manage > tags. I named it as and 测试 used the slug foobar. Now in a post if tag it 测试 it will create a new tag with the name 测试 and the slug %e6%b5%8b%e8%af%95. If I were to enter in foobar as the tag for the post, it will display 测试 as the tag. What's worse is if you resave the post it will switch from the "foobar" slug tag to the %e6%b5%8b%e8%af%95 slug tag, creating two tags. That's what you are seeing. Now I can do the same thing using the tag Moo with the slug cow, resave it and I get Moo with the slug moo. Thus it is not limited to UTF-8/Chinese character set only problem and seems consistent with the findings of tai in #6313.

#8 @free8
14 years ago

I modified taxonomy.php code with #6313, but no effect, after submit this ticket.

#9 @mtekk
14 years ago

I'm guessing the code that lilyfan placed on that, though not a SVN patch, may not work fully. This afternoon I'll look at it and see if I can get it to work properly.

#10 @mtekk
14 years ago

After testing lilyfan's code I see as you said, Chinese characters do not get fixed (still have the issue after a second save). If that ticket was closed this would have been an appropriate ticket. Since it is not, it is still that bug not being fixed correctly. I'm going to try to fix it, and I'll submit a patch on #6313.

#11 @free8
14 years ago

Thank you very much!

Note: See TracTickets for help on using tickets.