Ticket #4603 (new defect)

Opened 1 year ago

Last modified 1 year ago

wp.newCategory should prevent adding multiple categories of the same name/slug/parent

Reported by: redsweater Assigned to: josephscott
Priority: normal Milestone: 2.9
Component: XML-RPC Version: 2.2.1
Severity: normal Keywords:
Cc: redsweater, josephscott

Description

This bug is related to http://trac.wordpress.org/ticket/3683 but is intended specifically as a behavior request for wp.newCategory in the XMLRPC-WP interface.

Currently wp.newCategory will happily assign new category IDs for the same term with the same slug at the same hierarchical level. This seems highly unlikely to be in the spirit of what any client is requesting, so to protect the category structure, I propose the following change:

IF the requested category name, slug, and parent ID all match an existing category in the targeted blog, return the existing category ID as if it had just been created.

This would have the happy coincidence of covering a race condition problem that might exist if two users were authorized to edit the same blog, and both submitted changes that caused an identical "newCategory" call to be made at the same time.

Change History

07/10/07 13:58:11 changed by foolswisdom

  • milestone set to 2.4 (future).

09/26/07 16:30:09 changed by josephscott

  • cc changed from redsweater to redsweater, josephscott.