[wp-trac] [WordPress Trac] #5809: Categories affect tags of the same name

WordPress Trac wp-trac at lists.automattic.com
Sun Feb 21 00:27:36 UTC 2010


#5809: Categories affect tags of the same name
--------------------------+-------------------------------------------------
 Reporter:  rmccue        |       Owner:  ryan          
     Type:  defect (bug)  |      Status:  new           
 Priority:  normal        |   Milestone:  Future Release
Component:  Taxonomy      |     Version:  2.5           
 Severity:  normal        |    Keywords:                
--------------------------+-------------------------------------------------

Comment(by archon810):

 Hi guys,

 I had a similar situation just now and I think this behavior is very
 confusing and limiting to WP users.

 Here's what happened:
  - I created a few posts with tags, such as "HTC".
  - I then decided to add a few categories, one of which is Phones, with a
 child one called "HTC"
  - The categories were created OK but the slug was not, because it is set
 as UNIQUE in the DB table. Instead, the current logic falls back on the
 slug comprised of parent categories, until the slug is made unique (such
 as phones-htc).
  - Now, the url to the post will have phones/phones-htc (and if I had more
 problematic slugs like this, it could get even uglier: phones/htc-phones
 /hero-htc-phones-phones). This is bad for SEO and is straight up confusing
 to the user who enters a slug but gets another slug when he or she
 refreshes the page.

 In summary, it's a shortcoming of the application to not allow the same
 category name as the tag name. There are workarounds, of course, such as
 renaming the slug slightly, but it's still a bug.

 Now, as far as the solution, because the wp_terms table doesn't have the
 term type, it's not possible to make a composite unique key. Therefore,
 the unique key would need to be dropped and proper behavior would need to
 be enforced from the application (WP).

 Any other suggestions are welcome.

 Thanks, guys.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/5809#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list