Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#27194 closed defect (bug) (duplicate)

wp.editPost does not allow removal of all terms for a taxonomy

Reported by: maxcutler's profile maxcutler Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.4
Component: XML-RPC Keywords: has-patch
Focuses: Cc:


wp.newPost and wp.editPost XML-RPC methods have a terms argument which allows setting of the terms associated with the post. This argument is an array with taxonomy names as keys and arrays of term IDs as values.

If a taxonomy is explicitly supplied with an empty list of IDs, the expectation is that this would cause removal of all currently-associated terms in that taxonomy from the post.

For example, if a post has 'Cat A' and 'Cat B' associated with it, passing array( 'category' => array() ) should cause both of those categories to be unassociated with the post.

This issue has existed since I wrote this code back in 3.4.

Attachments (1)

27194.patch (1.9 KB) - added by maxcutler 10 years ago.

Download all attachments as: .zip

Change History (4)

10 years ago

#1 @maxcutler
10 years ago

  • Keywords has-patch added

Added patch with unit test.

#2 @danielbachhuber
10 years ago

  • Milestone changed from Awaiting Review to 3.9
  • Version changed from 3.8.1 to 3.4

#3 @SergeyBiryukov
10 years ago

  • Milestone 3.9 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #26686.

Note: See TracTickets for help on using tickets.