I'm trying to sort out an AJAX bug (edits to contacts not being saved) and the console error says:

Mixed Content: The page at 'https://studentleadership.ca/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcontact%2Fview&reset=1&cid=9532' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://studentleadership.ca/wp-admin/admin.php?page=CiviCRM&q=civicrm/ajax/inline'. This request has been blocked; the content must be served over HTTPS.`enter preformatted text here`

Originally I thought that it was because the resource URLs weren't set to https, but I changed that and nothing happened.

I checked the base url and the base url is still http://. It won't update when I change it to https://, it saves but when I go back to the page it says http://

  • 1
    did you check your settings in both civicrm.settings.php and whatever the WP equivalant of drupal's settings.php?
    – petednz - fuzion
    Commented Dec 3, 2015 at 3:39

2 Answers 2


Check your CIVICRM_UF_BASEURL value in civicrm.settings.php and check also the settings under Administer --> System Settings --> Resource URLs.

In the latter you can force civicrm to load css/js via https.

  • The base url in civicrm.settings.php was set to http:// Commented Dec 7, 2015 at 3:55

To fixed this issue we use drupal secure pages module. From this module configuration we configure redirect to http is resources are not found at secure URL. Also we exclude the JavaScript and ajax from secure pages.

Check if there is any module like secure pages in WordPress.

  • It's creating problem because I think you have enabled forced secure URL.
    – Prem Patel
    Commented Dec 3, 2015 at 2:22
  • Force Secure URLs is turned off at the moment. I tried it to see if it would fix anything, but it said "You need to set up a secure server before you can use the Force Secure URLs option" so I turned it back off again. Commented Dec 3, 2015 at 2:54
  • 1
    Check your base URL in civicrm.setting s.php file.
    – Prem Patel
    Commented Dec 3, 2015 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.