Make WordPress Core

Opened 3 years ago

Last modified 3 years ago

#54147 new defect (bug)

XMLRPC API ignores empty terms_names array

Reported by: redsweater's profile redsweater Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: XML-RPC Keywords: has-patch has-unit-tests
Focuses: Cc:

Description

There is a bug in the XMLRPC API that causes API clients who use the terms_names field to set tags or other terms to be unable to completely remove tags from a post using this API.

I'm attaching a patch that addresses the problem by ensuring that if there is an input entry for terms_names on a given taxonomy, that at least an empty array is established as the updated terms property for the updated post.

I'll add a unit test update to this ticket soon.

Attachments (2)

xmlrpc-terms-names-fix.diff (1.3 KB) - added by redsweater 3 years ago.
Patch to fix the described the bug
xmlrpc-term-names-test.diff (1.8 KB) - added by redsweater 3 years ago.
Unit test confirming the fix for the bug

Download all attachments as: .zip

Change History (4)

@redsweater
3 years ago

Patch to fix the described the bug

@redsweater
3 years ago

Unit test confirming the fix for the bug

This ticket was mentioned in Slack in #core by redsweater. View the logs.


3 years ago

#2 @redsweater
3 years ago

  • Keywords has-patch has-unit-tests added
Note: See TracTickets for help on using tickets.