WordPress error when saving: "There was an error. You are probably offline."

Never mind, it is all working now. I just had to refresh my browser cache.

Thank you so much KangJL!

1 Like

Need to do this

1 Like

Turns out that still did not fix the issue. I am still not able to save on WordPress.

The post you linked originally talked a lot about cloud fare, but not how you actually set it up or what it is needed for.

Could you possibly explain a bit about that?

I even forced all traffic, including WordPress admin, to use HTTPS and still the same issue.

You can’t, unless you have custom domain

I do not have it. It seems cloud fare is not the issue as many people with free subdomains have WordPress working.

Any ideas from here on?

Try this???

2 Likes

Yes, I tried those. I even installed a plugin which searches your WordPress database for all occurrences of a word and replaces it with your chosen word.

I chose for it to search for my site name with http and then replace it with https.

I did however figure something out. When I press ‘Update’ (only on my widget page do I get this offline issue), in the console it returns with the below error:

Access to fetch at 'https://infinityfree.net/errors/403/' (redirected from 'https://website/wp-json/batch/v1?_locale=user') from origin 'https://website' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

“No ‘Access-Control-Allow-Origin’ header is present on the requested resource” - This seems to be causing the issue, I am unsure how to add that to the request?

Here is a comment on a post, from the admin, in reply to another user who posted the same error:

The CORS blocking is probably not the issue, it’s the fact that your site is trying to load a page which redirects to our 403 Forbidden error. If you ensure that the required URLs in your site don’t return a 403 Forbidden error, then the CORS issue will be gone too.

I do not understand how this can be the case, because all I am trying to do is get rid of a default widget.

Most of the time, this error was due to CF misconfiguration.

Did you migrate WP from elsewhere?

Just disable it

1 Like

Thanks for the help so far.

I have not migrated WordPress from anywhere else. In terms of disabling the widget, why would I want to do that? I have a sidebar widget menu, and I want to get rid of one of the items in it (such as ‘Recent Posts’).

What is meant by CF?

CloudFlare. Since you are using free subdomain, this possibility has been ruled out.

Do you see this offline error using default theme and plugin configuration? (fresh install)

The same was happening with default theme and plugins.

Did you…?

install the classic editor plugin, enable the classic editor (instead of the block editor)

2 Likes

I just tried multiple themes. It seems to happen to them all.

It seems that, when saving the widget, it tries to redirect to the 404 infinity free page for whatever reason. That request to retrieve the 404 page is blocked due to CORS policy.

I do not understand what is causing the WordPress to throw the 404 error.

In addition to my other fix attempts, I changed the time zone to match the one I am in as that seemed to cause issues for other members. This did not fix it for me.

As last resort, try installing WP on a new hosting account.
Screenshot what you did along the way. Do not leave out any important details

I already did that when I first had the issue.

New Account > App Installer > Wordpress > Install

Those were my exact steps.