Make WordPress Core

Opened 5 years ago

Last modified 5 years ago

#54147 new defect (bug)

XMLRPC API ignores empty terms_names array

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

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

Download all attachments as: .zip

Change History (4)

@redsweater
5 years ago

Patch to fix the described the bug

@redsweater
5 years ago

Unit test confirming the fix for the bug

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


5 years ago

#2 @redsweater
5 years ago

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