[wp-trac] [WordPress Trac] #7773: Duplicate enclosure attributes
are created when a client resubmits a post with identical enclosure
WordPress Trac
wp-trac at lists.automattic.com
Sun Sep 21 04:25:07 GMT 2008
#7773: Duplicate enclosure attributes are created when a client resubmits a post
with identical enclosure
------------------------+---------------------------------------------------
Reporter: redsweater | Owner: josephscott
Type: defect | Status: new
Priority: normal | Milestone: 2.8
Component: General | Version:
Severity: normal | Keywords:
------------------------+---------------------------------------------------
The support in 2.6 for accepting enclosures via XMLRPC does not
discriminate whether the specified enclosure is already attached to the
post in question. This has the effect that if a client redundantly re-
specifies the enclosure value, WordPress will redundantly add new
enclosure custom field entries, each time the post is edited.
The code that accepts <enclosure> elements should only add a new custom
field to the post if the enclosure specified is different from the
previous enclosure(s). Arguably, for an XMLRPC context, the specified
enclosure should always replace the (presumed singular) enclosure on the
post.
Right now, the number of redundant enclosure attributes can spiral out of
control depending on the number of times a given post is edited by a
remote client that re-specifies all the known attributes of a post.
Consider for example, that when resubmitting a post, it's natural and
expected to re-specifiy the <title> even if it hasn't changed. This
doesn't cause multiple "title" attributes to appear on a post. The re-
specification of the <enclosure> value shouldn't cause attribute bloat in
posts.
Daniel
Daniel
--
Ticket URL: <http://trac.wordpress.org/ticket/7773>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list