[wp-trac] [WordPress Trac] #28659: Save attachment order, AJAX-nonce missing
WordPress Trac
noreply at wordpress.org
Fri Jun 27 14:54:11 UTC 2014
#28659: Save attachment order, AJAX-nonce missing
--------------------------+-----------------------------
Reporter: IPM | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 3.9.1
Severity: normal | Keywords:
Focuses: javascript |
--------------------------+-----------------------------
There seems to be something wrong in media-models.js. When the action
save-attachment-order is run no nonce is available for the AJAX call and
thus the PHP function returns an error and the attachment order is not
saved.
{{{
return media.post( 'save-attachment-order', {
nonce: media.model.settings.post.nonce
}}}
Here, media.model.settings.post.nonce does not exist. The action save-
attachment works and uses the this.get('nonces').update value so I'm
guessing the model is not properly updated which means this value is not
available to the save-attachment-order action.
This has worked before so I'm guessing a bug was introduced in recent
versions.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28659>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list