Wrong URL in WP Multisite, for /wp-admin/admin-ajax.php
-
WordPress Multisite installed on multisiterootdomain.com
Running ASA on a site with domain mapped to mappeddomain.dom (so mapped.multisiterootdomain.com gets mapped to mappeddomain.com).Collection not displaying on page
Calls to admin-ajax.php have the wrong domain name. This generates an error (visible in Firefox Inspector) “Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at multisiterootdomain.com//wp-admin/admin-ajax.php. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).”
The domain for admin-ajax.php should have the mapped domain, the domain of the site calling ASA. Also, there is that double slash / .
/wp-admin/options-general.php?page=amazonsimpleadmin%2Famazonsimpleadmin.php&task=collections#manage_collection
Clicking the Collection Browse button does properly display the Amazon items in the collection.
Example of one of the ajax calls shows in the Inspector in the Parameters tab:
action asa_async_load
asin B0008D6WBA
nonce c9541dcc6d
params {“items”:”20″}
tpl defaultTest on /wp-admin/options-general.php?page=amazonsimpleadmin%2Famazonsimpleadmin.php&task=test
“Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://multisiteroot.com//wp-admin/admin-ajax.php. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).”
action asa_async_load
asin B0008D6WBA
nonce f80e74f0fa
params []
tpl book
- The topic ‘Wrong URL in WP Multisite, for /wp-admin/admin-ajax.php’ is closed to new replies.