Without having made any changes recently to my WP, all ajax calls involving wpDiscuz on the front end started getting 403s
Tried purging all caches, disabling all caches, changing the option to use wpdiscuz ajax vs admin ajax back and forth, turning off Wordfence, checking WAF logs, checking error logs, and talking to my host Cloudways
My user now works, but most others do not. I cannot reproduce it now on my side but can see it on other user's devices.
Seems like a nonce issue related to cache but I cannot confirm that or fix it by disabling the caches
My host gave me this table of 403s:
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ 403 │ ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬───────┤ │ STATUS │ COUNT │ ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼───────┤ │ /wp-json/wpdiscuz/v1/wunUpdate?request_type=check&last_id=0&is_new=1&nonce= │ 882 │ │ /wp-json/objectcache/v1/analytics?context=compute&interval=60&_fields=timestamp%2Cdate_display%2Cms-total.median%2Cms-cache.median%2Cms-cache-ratio.median%2C │ 170 │ │ hits.median%2Cmisses.median%2Chit-ratio.median │ │ │ /wp-admin/admin-ajax.php │ 59 │ │ /wp-json/wpdiscuz/v1/wunUpdate?request_type=check&last_id=0&is_new=1&load_raw=1&nonce= │ 24 │ │ /wp-admin/admin-ajax.php?action=gppa_get_batch_field_html │ 8 │ │ /wp-json/wpdiscuz/v1/wunUpdate?request_type=load&last_id=0&is_new=1&nonce= │ 3 │ │ /wp-json/wp/v2/pages/30583?context=edit&_locale=user │ 3 │ │ /wp-json/wpdiscuz/v1/update?postId=27714&lastId=0&visibleCommentIds= │ 2 │ │ /wp-json/wp/v2/users?context=view&who=authors&per_page=100&_fields=id%2Cname&_locale=user │ 2 │ │ /wp-json/wpdiscuz/v1/update?postId=38184&lastId=164&visibleCommentIds=164%2C163%2C154%2C152%2C156%2C151%2C153%2C143%2C145%2C146%2C147%2C141%2C137%2C133%2C132 │ 1 │ │ /wp-admin/users.php │ 1 │ │ /wp-json/wp/v2/categories/1?context=edit&_locale=user │ 1 │ │ /wp-json/wpdiscuz/v1/wunUpdate?request_type=load&last_id=0&is_new=0&nonce= │ 1 │ └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴───────┘
Please check your security plugins' options and make sure they don't block the WordPress AJAX. This could be also blocked by the .htaccess file.
If none of the plugins caused the issue please contact server support and ask them to check the access of the admin-ajax.php file. This also can be done by the server side.