WordPress.org

Make WordPress Core

Opened 4 weeks ago

Last modified 4 weeks ago

#54147 new defect (bug)

XMLRPC API ignores empty terms_names array

Reported by: 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 4 weeks ago.
Patch to fix the described the bug
xmlrpc-term-names-test.diff (1.8 KB) - added by redsweater 4 weeks ago.
Unit test confirming the fix for the bug

Download all attachments as: .zip

Change History (4)

@redsweater
4 weeks ago

Patch to fix the described the bug

@redsweater
4 weeks ago

Unit test confirming the fix for the bug

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


4 weeks ago

#2 @redsweater
4 weeks ago

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