WordPress.org

Make WordPress Core

Opened 19 months ago

Last modified 4 months ago

#22023 new enhancement

Remove UNIQUE for slug in wp_terms

Reported by: nacin Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 2.3
Component: Taxonomy Keywords: has-patch 3.9-early
Focuses: Cc:

Description

To set us up for future changes to the taxonomy API, we should remove the UNIQUE key for 'slug' for wp_terms. Said future changes include:

  • Splitting shared terms on update (#5809)
  • Stop creating shared terms (#21950)
  • Forcibly split remaining shared terms
  • Merge wp_terms and wp_term_taxonomy (I can dream, right?)

The term_exists() check should prevent duplicate terms from ever being inserted (before, of course, we fix #5809 and #21950). But, this needs unit tests, particularly because there is a case where term_exists() breaks. See #17689, which blocks this ticket.

Attachments (1)

22023.patch (464 bytes) - added by hotchkissconsulting 6 months ago.

Download all attachments as: .zip

Change History (28)

comment:1 scribu19 months ago

  • Cc scribu added

comment:2 hsatterwhite19 months ago

  • Cc whsatterwhite@… added

comment:3 knutsp19 months ago

  • Cc knut@… added

comment:4 toscho19 months ago

  • Cc info@… added

comment:5 webord19 months ago

  • Cc webord.net@… added

comment:6 sirzooro19 months ago

  • Cc sirzooro added

comment:7 goblindegook19 months ago

  • Cc goblindegook added

comment:8 webord19 months ago

For the version 3.5 we would need:

  • Remove the UNIQUE from slug on wp_terms
  • Improvments on term_exists()

Just checking so we can delivery something on 3.5

comment:9 082net18 months ago

  • Cc 082net added

comment:10 intoxstudio18 months ago

  • Cc jv@… added

comment:11 wonderboymusic18 months ago

  • Keywords needs-patch reporter-feedback added

Is this part of 3.5 or 3.6?

comment:12 scribu18 months ago

  • Keywords reporter-feedback removed
  • Milestone changed from 3.5 to Future Release
  • Type changed from defect (bug) to enhancement

No unit tests; #17689 not fixed yet. Punting.

comment:13 nacin18 months ago

Yeah, I thought this was punted a while ago.

comment:14 aaroncampbell15 months ago

  • Cc aaroncampbell added

comment:15 aaroncampbell15 months ago

  • Milestone changed from Future Release to 3.6

comment:16 adamsilverstein15 months ago

  • Cc ADAMSILVERSTEIN@… added

comment:17 sc0ttkclark15 months ago

  • Cc lol@… added

comment:18 tomdxw15 months ago

  • Cc tom@… added

comment:19 tomdxw15 months ago

  • Cc tom@… removed

comment:20 Viper007Bond14 months ago

  • Cc Viper007Bond added

comment:21 greenshady14 months ago

  • Cc justin@… added

comment:22 ryan11 months ago

  • Milestone changed from 3.6 to Future Release

comment:23 nacin8 months ago

  • Milestone changed from Future Release to 3.7

Fixing #5809 requires this to be fixed to get the ball rolling for http://make.wordpress.org/core/2013/07/28/potential-roadmap-for-taxonomy-meta-and-post-relationships/. #17689 must be fixed first.

comment:24 nacin7 months ago

  • Milestone changed from 3.7 to 3.8

We can do #5809 and this in the same release.

hotchkissconsulting6 months ago

comment:25 hotchkissconsulting5 months ago

  • Keywords has-patch added; needs-patch removed

There's a patch now. A teeny, tiny one.

comment:26 wonderboymusic5 months ago

  • Keywords 3.9-early added
  • Milestone changed from 3.8 to Future Release

comment:27 maorb4 months ago

  • Cc maor@… added
Note: See TracTickets for help on using tickets.