Error: Code 0 - communications failure

Every once in a while when I open a page in MODx, the following dialog will pop up.

image

Error:
Code: 0 communication failure.

I have seen in on resources and chunks. What is this trying to tell me?

Make sure you’ve uncommented one of the following in the .htaccess file in your website root.

# Rewrite www.example.com -> example.com -- used with SEO Strict URLs plugin
#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
#RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
#
# or for the opposite example.com -> www.example.com use the following
# DO NOT USE BOTH
#
#RewriteCond %{HTTP_HOST} !^$
#RewriteCond %{HTTP_HOST} !^www\. [NC]
#RewriteCond %{HTTP_HOST} (.+)$
#RewriteRule ^(.*)$ https://www.%1/$1 [R=301,L] .

Please look, which XHR request sends this response during loading the manager page. Then you can locate the cause of this.

The first section was uncommented.

RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
1 Like

What is an XHR request and where do I look for which one is doing it?

You can see those using the browser dev tools at the network tabs, see the following image

and on each request, you can actually see the what was requested and what was the response, from there you can see what’s failing, here you can see a successful response, in your case you should see some sort of error

2 Likes