Support

Account

Home Forums Backend Issues (wp-admin) ACF unable to perform validation due to an invalid security nonce?

Solving

ACF unable to perform validation due to an invalid security nonce?

  • When I try to save the menu on my WordPress site, I get this error: Validation failed. ACF was unable to perform validation due to an invalid security nonce being provided.

    And the menu doesn’t get saved.

  • Just happened to me. Looks like it’s potentially an issue with 6.3.6 according to this thread:

    https://wordpress.org/support/topic/acf-unable-to-perform-validation-due-to-an-invalid-security-nonce/

  • The error you’re seeing usually happens because the security nonce used by WordPress has expired or is invalid. To fix it, try clearing your browser cache and cookies, then log out of WordPress and log back in to refresh the security token. If that doesn’t help, you may have a plugin conflict. Try deactivating plugins one by one, especially caching or security plugins, and see if the issue persists. Also, make sure your Advanced Custom Fields (ACF) plugin is up to date. You can find useful information on other WordPress solutions on this site.

  • You can find useful information on other WordPress solutions on this site.

    Thanks for the spam!

  • We are starting to see this error when saving or scheduling a post with ACF fields. ACF Pro version Version 6.3.9

  • Version 6.3.9 and we can’t save any changes to posts either.

  • Also experiencing this, ACF 6.3.9.

    for me it’s happening on a page with many, many ACF fields.

    I was able to resolve the issue by removing this code (used to bring back default Custom Fields meta boxes):

    // show default custom fields, even with ACF
    add_filter( 'acf/settings/remove_wp_meta_box', '__return_false' );
  • @clicknathan

    Thanks this works well. All I did was ad the wp code plugin, select a custom PHP snippet and add this code into it, and magic… the issue was fixed.

  • Just want to add my voice to this issue as it’s been happening to the sites I run ACF on since 6.3.6. I tried @clicknathan’s fix using Geoffrey’s method but it didn’t work for me. Was running 3.6.11 and still got the error. Only thing that’s worked is rolling back to 3.6.5. Since reverting a week ago I haven’t seen the error.

    It would be great if this issue could be resolved soon.

  • The likely underlying cause is that the nonce is getting truncated when the number of fields or parameters exceeds PHP’s max_input_vars setting.

    My guess is that @clicknathan’s fix works for those close to exceeding the limit, as disabling the metabox provides some needed leeway in the total number of input variables.

    For us, the fix seems to be increasing the site’s or server’s max_input_vars setting to 10,000, depending on the environment.

  • Was your menu like really long? We found and used the same solution. By increasing the max_input_vars we were able to save our larger than life menu.

  • Sometimes. I also get this error on this website. The ACF fields say validation failed. But sometimes. it works properly. I really can’t understand what is happening

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.