Getting CORS error from CiviCRM dashboard dashlets
OK. So I've found what I think is a pretty serious problem with the current Civi CRM setup and multisites...

There's an entire section up the top of civicrm.settings.php that has these lines:

$civicrm_paths['wp.frontend.base']['url'] = (URL path)
$civicrm_paths['wp.backend.base']['url'] = (URL path to admin)
$civicrm_setting['URL Preferences']['userFrameworkResourceURL'] =(URL path) to civicrm


The paths are hardcoded to the main site URL.

This seems to be what's causing these problems I'm having. Because if I change it using the code below, then it appears to work again.

=======================

if(function_exists('is_multisite') &amp;&amp; function_exists('home_url')) {
  $url = home_url();
}
else {
  $protocol = strstr('HTTPS', $_SERVER['SERVER_PROTOCOL']) ? 'https://' : 'http://';
  $url = $protocol . $_SERVER['SERVER_NAME'];
}


// Additional settings generated by installer:
$civicrm_paths['wp.frontend.base']['url'] = $url.'/';
$civicrm_paths['wp.backend.base']['url'] = $url.'/wp-admin/';
$civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = $url.'/wp-content/plugins/civicrm/civicrm';


===================

But is this a good idea? I don't know...

Norm