Make WordPress Core

Opened 19 years ago

Closed 19 years ago

Last modified 19 years ago

#4410 closed defect (bug) (wontfix)

wp_term_relationship

Reported by: znuff's profile znuff Owned by:
Milestone: Priority: high
Severity: major Version: 2.3
Component: General Keywords: database, taxonomy
Focuses: Cc:

Description

After the last wordpress database update (trunk) I'm experiencing problems with tags. Every time I post something I get a:

WordPress database error: [Duplicate entry '(the posts id)' for key 1]

Is anyone else experiencing the same issue with the latest database version (5539)? or did I miss an update along the way that's causing this?
This is what I currently have as the table's structure:

CREATE TABLE `wp_term_relationships` (
  `object_id` bigint(20) NOT NULL default '0',
  `term_taxonomy_id` bigint(20) NOT NULL default '0',
  PRIMARY KEY  (`object_id`),
  KEY `term_taxonomy_id` (`term_taxonomy_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

Change History (3)

#1 @ryan
19 years ago

That's an old version of the schema that has a bad primary key. You can drop the term tables and decrement the db_version (via wp-admin/options.php) to force an another upgrade. If you don't want to drop the tables, you can change the primary key to (object_id,term_taxonomy_id) with phpmyadmin.

#2 @Nazgul
19 years ago

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

#3 @foolswisdom
19 years ago

  • Milestone 2.3 (trunk) deleted
Note: See TracTickets for help on using tickets.