[wp-trac] [WordPress Trac] #24822: XMLRPC wp.editPost doesn't update existing keys

WordPress Trac noreply at wordpress.org
Tue Aug 27 21:14:57 UTC 2013


#24822: XMLRPC wp.editPost doesn't update existing keys
--------------------------+----------------------
 Reporter:  jmaimarc      |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  XML-RPC       |     Version:  3.3
 Severity:  normal        |  Resolution:  invalid
 Keywords:  has-patch     |
--------------------------+----------------------

Comment (by nacin):

 > I hit this on a recent project when we noticed multiple values were
 being stored on the same meta key without overwriting. We used the exact
 suggestion @nacin made above about deleting the key first then re-writing
 the value and it works fine.

 Deleting the key and then re-adding is only if you wanted to take the same
 row in the metadata table and change the ''key''.

 If all you want to do is update an existing key, then you need to pass the
 meta ID. This is the unique identifier for metadata in the XML-RPC API and
 is very important to ensuring that deletes, adds, and updates all happen
 properly.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24822#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list