Wordpress 403 error on form submission with Ajax

I have a wordpress multisite set up, and in my sub-site (called "team" site) I have buddypress. There is an ac

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 badges
Add a comment  | 

1 Answer 1

Reset to default 0

the 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)

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742316981a4421035.html

相关推荐

  • Wordpress 403 error on form submission with Ajax

    I have a wordpress multisite set up, and in my sub-site (called "team" site) I have buddypress. There is an ac

    11小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信