There are many reasons this error can occur. Those two were the most frequent for me:
Session-Cookie
Open the Javascript Console by pressing F12 and click on the tab “Console”. If you see some error message that goes something like cookie_nonce
it’s a session cookie problem.
The problem solves by just completely logging out and possibly also deleting all cookies of your website.
File-Permissions
If you have a webserver you manage on your own it may be that file permissions are wrong.
The instructions here have never failed to resolve my issues so far, so it’s worth checking out.
It’s those commands:
Add yourself to www-data group:
sudo gpasswd -a "$USER" www-data
Change file permissions:
sudo chown -R "$USER":www-data /var/www
find /var/www -type f -exec chmod 0660 {} \;
sudo find /var/www -type d -exec chmod 2770 {} \;
Related Posts:
- Displaying PHP Errors from admin-ajax.php
- Solve cors problem using rest api or ajax
- (updated) How to add AJAX error handling to a (fully) custom registration form?
- wp_handle_upload returns empty error array
- Gravity form Load By Ajax Cannot Submit – Error 400
- eventON plugin AJAX call triggers website crash
- contact form ajax empty response error message
- ModSecurity && Admin Ajax: Server locking up
- change wordpress pagination url after doing the request
- WordPress POST AJAX call, var_dump($_POST) NULL and AJAX response empty when inside ob_start
- WordPress 403 error on form submission with Ajax
- admin-ajax.php 403 errors – no caching, permissions are fine
- Ajax call not working anymore
- Syntax error on query_vars while handling with Jquery
- While doing ajax, WordPress returning internal server error 500 and stating that my theme functions are undefined
- jQuery’s .on() method combined with the submit event
- Why is die() used at the end of function that handles an Ajax request?
- Making my AJAX powered WordPress Crawlable
- Using Backbone with the WordPress AJAX API
- WordPress Ajax Data Security
- Why is a 500 error generated by admin-ajax.php not going into the Apache error log?
- admin-ajax.php doesn’t work when using POST data and Axios
- Custom Form with Ajax
- How to process ajax requests correctly using ajax plugins
- How do I hook an Ajax request into a PHP callback?
- Gutenberg – how to correctly perform ajax request on backend
- get_template_part execute with ajax
- How to add WordPress nonces to ajax request
- How is it possible that the function of the test page works, but it does not go live?
- How declare Ajax functions ussing SHORTINIT
- Load custom formatted comment with AJAX: reply link isn’t rendered?
- Is there a way to optimize function that is used for returning data in an ajax-call?
- WP REST API route request explain
- get_posts empty when called via Ajax
- WP-API and Basic Auth returning 403 on POST but not GET
- Is there a hook to process a backbone restful PUT request inside wordpress?
- Check if username exist with AJAX
- How to localized one js file for different actions?
- WooCommerce: Translation lost on AJAX call in Checkout page [closed]
- Async Loading of Custom Posts
- Call javascript function when category was added via ajax
- How to add WP API and JS featured image attachment
- Ajax return code 400
- Using AJAX with Forms
- json encode not work in wordpress
- wordpress and add actions to button by coding
- Get Author Post on author.php with AJAX
- Can’t publish post using ajax
- Getting back to ajax search results from a page
- Updating a checkbox value to database for specific row in table
- WordPress Ajax Not Working ( Custom Admin page)
- Load JavaScript from a post that’s loading into Fancybox via ajax
- How to Fix “Are You Sure You Want to Do This”, while uploading my theme?
- How get child posts in custom post type by ajax?
- Cache wp-json/posts without a plugin?
- What is the best way to do MyAjax error and success handling?
- Gravity Forms closes my popup on Validation Error [closed]
- Attach time/date stamp on add_post_meta
- Uncaught ReferenceError: the_ajax_script is not defined . How is this not defined?
- infinite scroll not working when logged out
- I can’t get a return value from Ajax
- WordPress AJAX return 0 – My case
- Creating an auto result search bar
- update_option is not saving an array, but saving the string ‘Array’
- Ajax call in wordpress not working for subscriber user
- Upload data from weather station to WordPress Website
- Ajax call in WordPress – unable to display the data on the page
- javascript variable to wordpress php variable
- How to reuse get_template_part() containing a simple loop to work with AJAX correctly?
- Need help with ajax
- Using nonce when loading posts with AJAX
- What WP-API authentication method should I use to interact with anonymous / not-logged visitors?
- How to call ajax in plugin file
- Tabbed feeds with ajax vs. without on homepage [closed]
- javascript onClick update user_meta from jquery.ajax
- How to ignore WP_ERROR caused by “get_the_excerpt” method in an AJAX call?
- WP_Query is not received in Ajax
- How do I mitigate replay attacks when talking about actions that shouldn’t happen twice?
- Updating Jquery object with newly created elements after AJAX call
- Not getting ajax success response on insert/update row to database
- Wp admin ajax load more
- Ajax call from Plugin using Class
- enqueue style using admin-ajax.php
- How to safely pass post_id and user_id via AJAX to the backend (prevent user from changing it via JS)?
- Can’t get next post info with ajax
- How to inject data content from external json into a modal, using UIkit?
- Call public static method from ajax ‘wpcf7_mail_sent’ hook
- Update user meta via ajax from frontend, saving issue
- How to get the admin page slug using wp_loaded hook?
- Edit user meta on front-end via AJAX
- SyntaxError: unterminated string literal – if WordPress Debug in wp-config is set to true
- How to paginate Ajax result
- Cannot access class properties from ajax call in wpordrpess
- why is my main.js not loading?
- Enqueue dynamically generated javascript
- First time doing Ajax with WP, how to do it?
- Tie the sending of an ajax request to WordPress hooks
- AJAX: admin-ajax.php is adding extra content to my script’s response – how to exclude header, footer, etc.?
- apply_filters, EMBEDS and AJAX not a friends? [duplicate]
- Can’t have two simultaneous charts using Apex Charts