admin管理员组文章数量:1387445
I have a bug with an Ajax request but it works on Firefox. You can test it clicking here
For Edge/Chrome I got a 400 error.
In Edge I got this error :
HTTP400: INCORRECT REQUEST - the request could not be processed by the server due to invalid syntax.
What could be the problem in my request ?
Request : .php?action=getH4ACustomPostTypeByAjax&data%5Bh4a-list-post-status%5D=false&data%5Bh4a-list-view-mode%5D=card&data%5Bh4a-list-post-type%5D=formation&data%5Bh4a-list-spec-cat%5D=false&data%5Bh4a-list-cat%5D=false&data%5Bh4a-list-order%5D=false&data%5Bh4a-list-orderby%5D=false&data%5Bh4a-list-meta-key%5D=false&data%5Bh4a-posts-per-page%5D=false&data%5Bh4a-list-pagination%5D=false&is_count=true
Why it works for Firefox but not for others browsers ?
I have a bug with an Ajax request but it works on Firefox. You can test it clicking here
For Edge/Chrome I got a 400 error.
In Edge I got this error :
HTTP400: INCORRECT REQUEST - the request could not be processed by the server due to invalid syntax.
What could be the problem in my request ?
Request : https://www.passerellepouremploi/wp-admin/admin-ajax.php?action=getH4ACustomPostTypeByAjax&data%5Bh4a-list-post-status%5D=false&data%5Bh4a-list-view-mode%5D=card&data%5Bh4a-list-post-type%5D=formation&data%5Bh4a-list-spec-cat%5D=false&data%5Bh4a-list-cat%5D=false&data%5Bh4a-list-order%5D=false&data%5Bh4a-list-orderby%5D=false&data%5Bh4a-list-meta-key%5D=false&data%5Bh4a-posts-per-page%5D=false&data%5Bh4a-list-pagination%5D=false&is_count=true
Why it works for Firefox but not for others browsers ?
Share Improve this question edited Apr 18, 2020 at 13:30 fuxia♦ 107k39 gold badges255 silver badges459 bronze badges asked Apr 17, 2020 at 20:18 J.BizMaiJ.BizMai 9002 gold badges10 silver badges30 bronze badges 4 |1 Answer
Reset to default 3Problem fixed !
The problem was not due to a browser matter.
wp_ajax_nopriv_myfunction
was wrapped by is_admin()
. That could not work.
I was logged in in Firefox and not in Chrome that´s why I thought it was a browser matter.
本文标签: browser compatibilityadminajax return error 400 for ChromeEdge but not Firefox
版权声明:本文标题:browser compatibility - admin-ajax return error 400 for ChromeEdge but not Firefox 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744550356a2612146.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
wp_ajax_nopriv
was wrapped byis_admin()
. That could not work ^^. Thanks a lot ! – J.BizMai Commented Apr 20, 2020 at 14:33