WordPress.org

Make WordPress Core

Opened 9 months ago

Last modified 5 weeks ago

#22023 new enhancement

Remove UNIQUE for slug in wp_terms

Reported by: nacin Owned by:
Priority: normal Milestone: Future Release
Component: Taxonomy Version: 2.3
Severity: normal Keywords: needs-patch
Cc: scribu, whsatterwhite@…, knut@…, info@…, webord.net@…, sirzooro, goblindegook, 082net, jv@…, aaroncampbell, ADAMSILVERSTEIN@…, lol@…, Viper007Bond, justin@…

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.

Change History (22)

comment:1 scribu9 months ago

  • Cc scribu added

comment:2 hsatterwhite9 months ago

  • Cc whsatterwhite@… added

comment:3 knutsp9 months ago

  • Cc knut@… added

comment:4 toscho9 months ago

  • Cc info@… added

comment:5 webord9 months ago

  • Cc webord.net@… added

comment:6 sirzooro9 months ago

  • Cc sirzooro added

comment:7 goblindegook9 months ago

  • Cc goblindegook added

comment:8 webord9 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 082net8 months ago

  • Cc 082net added

comment:10 intoxstudio8 months ago

  • Cc jv@… added

comment:11 wonderboymusic8 months ago

  • Keywords needs-patch reporter-feedback added

Is this part of 3.5 or 3.6?

comment:12 scribu7 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 nacin7 months ago

Yeah, I thought this was punted a while ago.

comment:14 aaroncampbell5 months ago

  • Cc aaroncampbell added

comment:15 aaroncampbell5 months ago

  • Milestone changed from Future Release to 3.6

comment:16 adamsilverstein5 months ago

  • Cc ADAMSILVERSTEIN@… added

comment:17 sc0ttkclark5 months ago

  • Cc lol@… added

comment:18 tomdxw5 months ago

  • Cc tom@… added

comment:19 tomdxw5 months ago

  • Cc tom@… removed

comment:20 Viper007Bond4 months ago

  • Cc Viper007Bond added

comment:21 greenshady3 months ago

  • Cc justin@… added

comment:22 ryan5 weeks ago

  • Milestone changed from 3.6 to Future Release
Note: See TracTickets for help on using tickets.