Skip to content
Advertisement

wp-admin/admin-ajax.php 404 in action: send-attachment-to-editor

When I want to upload a photo to my article with the button to add a multimedia file, after uploading, when I click on the option to put it in the post. In the browser console wp-admin / admin-ajax.php gives a 404 error and no image is added to the post.

jquery.min.js?ver=3.5.1:2 POST wp-admin/admin-ajax.php 404 (Not Found)
send    @   jquery.min.js?ver=3.5.1:2
ajax    @   jquery.min.js?ver=3.5.1:2
s.ajax.s.ajax   @   jquery-migrate.min.js?ver=3.3.2:2
(anonymous) @   wp-util.min.js?ver=5.6:2
s.Deferred.s.Deferred   @   jquery-migrate.min.js?ver=3.3.2:2
send    @   wp-util.min.js?ver=5.6:2
post    @   wp-util.min.js?ver=5.6:2
attachment  @   media-editor.min.js?ver=5.6:2
(anonymous) @   backend.min.js?ver=6.0.3:10
(anonymous) @   backend.min.js?ver=6.0.3:10
c   @   jquery.min.js?ver=3.5.1:2
fireWith    @   jquery.min.js?ver=3.5.1:2
l   @   jquery.min.js?ver=3.5.1:2
(anonymous) @   jquery.min.js?ver=3.5.1:2
load (async)        
send    @   jquery.min.js?ver=3.5.1:2
ajax    @   jquery.min.js?ver=3.5.1:2
s.ajax.s.ajax   @   jquery-migrate.min.js?ver=3.3.2:2
processImages   @   backend.min.js?ver=6.0.3:10
media.editor.send.attachment    @   backend.min.js?ver=6.0.3:10
(anonymous) @   media-editor.min.js?ver=5.6:2
(anonymous) @   underscore.min.js?ver=1.8.3:2
v.map.v.collect @   underscore.min.js?ver=1.8.3:2
(anonymous) @   backbone.min.js?ver=1.4.0:2
(anonymous) @   media-editor.min.js?ver=5.6:2
p   @   backbone.min.js?ver=1.4.0:2
f   @   backbone.min.js?ver=1.4.0:2
l   @   backbone.min.js?ver=1.4.0:2
n.trigger   @   backbone.min.js?ver=1.4.0:2
_onModelEvent   @   backbone.min.js?ver=1.4.0:2
p   @   backbone.min.js?ver=1.4.0:2
f   @   backbone.min.js?ver=1.4.0:2
l   @   backbone.min.js?ver=1.4.0:2
n.trigger   @   backbone.min.js?ver=1.4.0:2
click   @   media-views.min.js?ver=5.6:2
click   @   media-views.min.js?ver=5.6:2
dispatch    @   jquery.min.js?ver=3.5.1:2
v.handle    @   jquery.min.js?ver=3.5.1:2

Advertisement

Answer

My problem was solved by disabling mod_security.

<IfModule mod_security.c>
  SecFilterEngine Off
  SecFilterScanPOST Off
</IfModule>

Add this to the end of htaccess.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement