A popup blocks the manager page on load with the message "Unexpected character: <" and the home html inside of it

Summary

A client wanted to update their site, so to prevent any changes affecting the live site, we duplicated it and put it on a subdomain. Everything works as expected except for this popup that appears when loading a page or saving a page. It is hidden with some CSS.

Step to reproduce

It just happens on page load when selecting a resource.

Observed behavior


The above is the popup with the css removed

Expected behavior

No popup

Environment

MODX 2.8.5, Chrome, nginx (I am pretty sure on this one but can double check)

Can you open the “Network” tab of developer tools in the browser and check what request returns that response?

Do you have an error page on this site or is the home page the error page?

There is no error page set, so I believe the home page is the default.

The network tab 404s when trying to the connectors for seosuite and versionx, then has some issues with some svg images in a migx which are returning the home page.

Check the paths in the file core/config/config.inc.php.
Maybe the Assets URL is wrong.

I’m pretty sure the assets url is right, since it is just /assets/ and the assets path has been updated properly too.

if (!defined('MODX_ASSETS_PATH')) {
    $modx_assets_path= '/home/accountname/subdomain/assets/';
    $modx_assets_url= '/assets/';
    define('MODX_ASSETS_PATH', $modx_assets_path);
    define('MODX_ASSETS_URL', $modx_assets_url);
}

So is the connector URL correct in the request?

If the URL is correct, then why the 404? Is there maybe some RewriteRule in the .htaccess file?


In case you have a base url ($modx_base_url) that is different than /, you have to add that to the $modx_assets_url as well.

The URL to connectors is correct, There are no rewrite rules, and can confirm the base url is /

There is 1 rewrite rule, it’s the friendly URLs one

# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

Found the issue, it was a file permission issue that was missed the first time around.

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.