Ticket #6545 (closed defect: duplicate)

Opened 5 months ago

Last modified 5 months ago

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

Reported by: free8 Assigned to: anonymous
Priority: high Milestone:
Component: General Version: 2.5
Severity: normal Keywords: tag slug
Cc:

Description

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.

Examples: 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

04/02/08 14:22:20 changed by mtekk

  • status changed from new to closed.
  • resolution set to duplicate.

Closing as duplicate of #6313

04/02/08 14:24:03 changed by Nazgul

  • milestone deleted.

04/03/08 01:45:33 changed by free8

  • status changed from closed to reopened.
  • resolution deleted.

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

04/03/08 01:48:56 changed by free8

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

04/03/08 02:15:49 changed by mtekk

  • status changed from reopened to closed.
  • resolution set to duplicate.

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.

04/03/08 02:50:32 changed by free8

http://test.tintin.host7.meyu.net/wp-admin/post.php?action=edit&post=1 username:admin password:123654 Please edit and save this post. Go back to Manage -> Tags, you will find two "测试" tags.

04/03/08 03:14:34 changed by mtekk

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.

04/03/08 04:14:03 changed by free8

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

04/03/08 12:31:22 changed by mtekk

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.

04/03/08 20:55:31 changed by mtekk

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.

04/04/08 03:35:35 changed by free8

Thank you very much!