|
/ Documentation /Troubleshooting & FAQ/ Settings or Cookie Categories Not Saving or Loading

Settings or Cookie Categories Not Saving or Loading

SureCookie settings can fail in two directions. A change you make does not stick, or the screen never fills in and shows a red Failed to load settings notice reading “An error occurred while loading settings. Please refresh the page to try again.” Both come from the same short list of causes: a required field is blocking the save, your account lacks permission, a security plugin or host firewall is blocking the request, your login has expired, or a cache is showing you old values.

SureCookie reads and saves general settings through the WordPress REST route /surecookie/v1/admin/settings. Cookie categories have separate routes. If a request fails, check its method, status and response in the Network tab.

An error loading the admin settings screen can leave the public banner running with its last saved configuration. Open a public page and check the banner and a resource you expect it to block.

One exception is worth knowing. Consent records are written through the REST API too, so a rule that blocks every /wp-json/ request also stops new entries appearing under SureCookie > Consent Logs.

Start With What the Screen Says

The message on screen tells you which half of the article you need.

  • Failed to load settings – the screen could not read your settings, so there is nothing to save yet. The request was refused before it reached WordPress, or your login expired. Go to Read the Failing Request in the Network Tab.
  • Save failed! – the request reached the server but did not complete. Work through the sections below, starting with the validation check.
  • Settings saved!, but the values still look old – the save worked and a cache is showing you stale data. Jump to Clear Your Caches.

Check for a Validation Error

Some fields are required, and leaving one empty blocks the entire save.

  • The Banner Message and the Preference Modal Description can’t be empty. If either is blank, SureCookie shows an inline error such as Banner message cannot be empty and the save doesn’t go through.
  • Fix the flagged field, then click Save again.
Cookie banner content settings

Make Sure You Have Permission

SureCookie checks a WordPress capability before allowing admin requests. The default is manage_options, which administrators normally have. A site can change the required capability using surecookie_capability.

If you can open the screen but saving fails, read the response. Saving Custom CSS also requires unfiltered_html.

Unblock the REST API

Read the Failing Request in the Network Tab

When the screen shows Failed to load settings or Save failed!, your browser already recorded the reason. One request holds it, and reading it replaces a week of guesswork.

  1. Open the SureCookie screen that is failing.
  2. Press F12 to open developer tools, then open the Network tab.
  3. Filter for settings when troubleshooting a general setting. When creating or editing a cookie category, filter for category.
  4. Reload the page, or click Save again.
  5. Select the failed request and read its HTTP method, status and response body.

Under plain permalinks the same request appears as /?rest_route=/surecookie/v1/admin/settings. Match what you see against the three cases below.

Status 401 With an HTML Body

If the response body is a web page rather than JSON, your host’s firewall answered before WordPress ran. Some hosts challenge any request whose URL contains the word settings, which catches SureCookie and WordPress itself. 20i StackProtect is one confirmed case: it returns a security verification page for those URLs.

Prove it is not SureCookie before you contact anyone. Open these two addresses in a normal browser tab:

  • https://yoursite.com/wp-json/wp/v2/settings
  • https://yoursite.com/wp-json/wp/v2/users

Both are core WordPress routes with no SureCookie code behind them. Each should return JSON, and a JSON error still counts as JSON. If the first returns a security or verification page while the second returns JSON, your host is filtering on the word in the URL, not on anything the plugin does.

Give your hosting provider the two response statuses and ask them to check their firewall logs for the specific failing request.

Status 403 With rest_cookie_invalid_nonce in the Body

The response reads {"code":"rest_cookie_invalid_nonce","message":"Cookie check failed"}. Your login is still recognised, but the security token attached to the screen has expired. This is the overnight tab.

Fix it as described in Refresh a Stale Session: reload the screen, and if that does not clear it, log out, log back in, and tick Remember Me.

Status 301 or 302 to a Different Hostname

The request is redirected before WordPress sees it, so the answer the screen is waiting for never arrives. Two things cause this, and neither is fixed anywhere in SureCookie.

  • A stale site address. Go to Settings > General and check WordPress Address (URL) and Site Address (URL). Both must match the hostname and the scheme your site actually serves, including www or its absence.
  • A CDN or proxy rule. If those two values are already correct, the redirect is being added in front of WordPress by a CDN, a reverse proxy, or a host rule. No setting inside WordPress can undo it. Remove or bypass the rule for /wp-json/.

When you click Save, SureCookie sends your changes to the WordPress REST API at /wp-json/surecookie/v1/admin/settings. If a security plugin, firewall, or server rule blocks REST requests, the save fails with Save failed!.

  1. Check your security plugin’s or hosting provider’s logs for a block at the time of the failed request. Record the affected route and HTTP method.
  2. If the provider confirms a false positive, ask it to correct the rule for the affected request and then test that action again.
  3. If it persists, ask your host whether a server firewall or security rule is blocking REST requests.
Save error notification on the SureCookie configuration screen.

Clear Your Caches

A page cache, a persistent object cache (Redis or Memcached), or a CDN can keep serving your old settings even after a successful save.

  1. Clear your WordPress page cache and flush any object cache.
  2. Purge your CDN.
  3. Reload the settings screen in a private window to confirm the new values.

Refresh a Stale Session

If you left the screen open overnight, or signed out in another tab, the security token behind the request expires. The failure is not silent: you get Save failed!, or Failed to load settings if the screen was reloading at the time. WordPress rotates that token every twelve to twenty-four hours.

Reload the screen first. That mints a fresh token and is usually enough. If it still fails, log out of WordPress, log back in, and tick Remember Me on the login form. Remember Me keeps you signed in for fourteen days instead of two, which is what stops this recurring.

Rule Out a Plugin or Theme Conflict

A JavaScript error from another plugin can stop the Save button from working.

  1. Open your browser’s developer console (press F12) and watch for errors when you click Save.
  2. Temporarily switch to a default theme, or pause other plugins one at a time, to find the conflict.

Cookie Categories Won’t Save

Cookie categories save independently of general settings. Creating a category sends a POST to /surecookie/v1/cookies/category. Editing one sends a PUT to /surecookie/v1/cookies/category/<id>. Check that request if a category change fails.

  • Category Name is required. A blank name blocks the save.
  • Built-in categories cannot be deleted. Essential Cookies, Functional Cookies, Analytics Cookies, Marketing Cookies, and Uncategorized Cookies show no delete action, only an edit action. Custom categories you added can be deleted.
  • Manage categories under SureCookie > Tracking Manager > All Cookies > Manage Categories.

When to Contact Support

If none of the above works, send us the details so we can investigate.

  • What you changed, and on which screen.
  • Whether you saw Settings saved! or Save failed!.
  • The status code and the response body of the failing settings request, from the Network tab.
  • Any errors in the browser console when you click Save.
  • Your caching, security, and hosting setup.
Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
Table of Contents
Scroll to Top