admin管理员组文章数量:1335620
I have a wordpress multisite set up, and in my sub-site (called "team" site) I have buddypress. There is an activity stream, but I cannot post updates to the activity because there is a 403 error. When I click "submit" on a post and inspect the error, this is what I see on the network tab:
Request URL: https://<<masked>>.sg/team/wp-admin/admin-ajax.php
Request Method: POST
Status Code: 403
Remote Address: <<masked by me>>.31.79.150:443
Referrer Policy: no-referrer-when-downgrade
And when I check the actual response tab, this is the message:
The link you followed has expired. https://<<masked>>.sg/team/ Please try again.
What could be causing this problem? I cannot replicate this error on my local host.
I have a wordpress multisite set up, and in my sub-site (called "team" site) I have buddypress. There is an activity stream, but I cannot post updates to the activity because there is a 403 error. When I click "submit" on a post and inspect the error, this is what I see on the network tab:
Request URL: https://<<masked>>.sg/team/wp-admin/admin-ajax.php
Request Method: POST
Status Code: 403
Remote Address: <<masked by me>>.31.79.150:443
Referrer Policy: no-referrer-when-downgrade
And when I check the actual response tab, this is the message:
The link you followed has expired. https://<<masked>>.sg/team/ Please try again.
What could be causing this problem? I cannot replicate this error on my local host.
Share Improve this question edited Jun 20, 2020 at 11:44 Gaurav asked Jun 20, 2020 at 11:38 GauravGaurav 236 bronze badges1 Answer
Reset to default 0the issue was to do with cookies. In a multi-site setup, the cookies that are set upon user login depends on which subsite the user logged in from; not all cookies give equal authority to submit forms. so the solution is either you (a) change your cookie domain to one common one in wp_config.php - in which case a user can log in anywhere and the cookies will be fine, or (b) have a redirect so that there is only one site that users can log in from. Because of my unique setup, I opted for (b)
本文标签: Wordpress 403 error on form submission with Ajax
版权声明:本文标题:Wordpress 403 error on form submission with Ajax 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742316981a2452014.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论