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)