Make WordPress Core

Opened 21 years ago

Closed 20 years ago

#1109 closed defect (bug) (fixed)

DB choking on duplicate category names

Reported by: anonymousbugger's profile anonymousbugger Owned by:
Milestone: Priority: normal
Severity: major Version: 1.5
Component: General Keywords:
Focuses: Cc:

Description

I was making sub-cats for a section of my blog when I tried to make a "Funny" category. I already had one, and instead of a nice "Sorry, name already taken" error, I got "BLARGHHGRHHRHGHRHHGH DATABASE ERROR YOU FOOL!!!!!"

bascially, it's just not premptivly checking for duplicates and returning a nasty error.

  • Jeff Minard

Attachments (1)

fix_1109.patch (1.1 KB) - added by anonymousbugger 21 years ago.

Download all attachments as: .zip

Change History (6)

#1 @anonymousbugger
21 years ago

  • Patch set to No

#2 @idanso
21 years ago

Added a patch to check if a category named $cat_name already exists. If so, die nicely

#3 @ryan
21 years ago

  • Patch changed from No to Yes
  • Status changed from new to assigned

#4 @anonymousbugger
21 years ago

there is no "dieing nicely" ;)

Probably should be patched to simply return false an then echo a message at the top of the pane in a *red* highlight box (much like the blue one that you get on a successful operation) that reads: "Duplicate category names aren't allowed. Please, be a little more original."

(ok, so maybe that's not the right wording for the error message...)

Jeff

#5 @filosofo
20 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in 2.0 and later, which versions allow you to create more than one category of the same name, with no db error.

Note: See TracTickets for help on using tickets.