[wp-trac] [WordPress Trac] #41387: Avoid 403's from AJAX requests from postbox.js

WordPress Trac noreply at wordpress.org
Mon Dec 4 21:24:10 UTC 2017


#41387: Avoid 403's from AJAX requests from postbox.js
-----------------------------------------+------------------------------
 Reporter:  bobbingwide                  |       Owner:
     Type:  defect (bug)                 |      Status:  new
 Priority:  normal                       |   Milestone:  Awaiting Review
Component:  Administration               |     Version:
 Severity:  normal                       |  Resolution:
 Keywords:  has-patch reporter-feedback  |     Focuses:  javascript
-----------------------------------------+------------------------------

Comment (by adamsilverstein):

 @bobbingwide Your use case seems out of scope for using the postbox.js
 script. Eg, it wasn't designed for this. Instead of changing corfe to fit
 your use, I'd suggest you overwrite the postbox script functionality after
 it loads to get it to more closely match what you want it to do.

 Since postboxes is exposed as a global, you can overwrite the save
 functionality. Something like this should work, make sure it runs
 immediately after postbox.js loads, and ideally prevent interaction with
 the toggles until your code runs:


 `postboxes.save_order = function() {};`

 Can you give that a try and see if it resolves your issue?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41387#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list