[wp-trac] [WordPress Trac] #17812: media_upload_form_handler runs twice when editing attachment from "From Computer" media upload tab (browser uploader)
WordPress Trac
wp-trac at lists.automattic.com
Wed Jun 15 18:48:58 UTC 2011
#17812: media_upload_form_handler runs twice when editing attachment from "From
Computer" media upload tab (browser uploader)
--------------------------+-----------------------------
Reporter: jeffstieler | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upload | Version:
Severity: normal | Keywords: has-patch
--------------------------+-----------------------------
After uploading a new media item "From Computer" using the browser
uploader, you are presented with a form to edit its fields.
Clicking "Save all changes" from this form causes
{{{media_upload_form_handler}}} to run, then {{{media_upload_gallery}}}
(presumably to redirect to the gallery tab), which then causes
{{{media_upload_form_handler}}} to run again.
This can cause problems for {{{edit_attachment}}} actions that only run
once and alter the posts table row for that attachment (since the
subsequent {{{media_upload_form_handler}}} could overwrite whatever
changes were made in the action if they don't match whats in
{{{$_POST}}}).
If the only reason {{{media_upload_gallery}}} is being called from the
other type upload handler is to redirect to the gallery tab.. perhaps this
patch is a better approach.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17812>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list