• Resolved Rob Watson

    (@rcwatson)


    I’m trying to resolve a mixed content error where Advanced Ads loads a .js file using http rather than https, but the fix I’m attempting has no effect.

    The error in Chrome Inspector says:

    Mixed Content: The page at ‘https://www.westernlegendsroundup.com/’ was loaded over HTTPS, but requested an insecure script ‘http://www.westernlegendsroundup.com/wp-content/plugins/advanced-ads/admin/assets/js/advertisement.js’. This request has been blocked; the content must be served over HTTPS.

    So I found in the plugin where I believe the protocol is specified. It’s this line in advanced-ads/advanced-ads.php

    define( 'ADVADS_BASE_URL', plugin_dir_url( __FILE__ ) );

    Which I changed to replace http with https using this code:

    define( 'ADVADS_BASE_URL', str_replace("/^http:/i", "https:", plugin_dir_url( __FILE__ )) );

    as an experiment to see if that would fix the problem. It didn’t. Can you update the plugin to ensure it takes on the https protocol if that’s what the user/browser is specifying?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Thomas Maier

    (@webzunft)

    Hi rcwatson,

    thanks for investigating the issue.

    I am pretty sure that Advanced Ads is configured correctly here, especially since you are the first to reach out with such a problem and I myself run almost all our sites with Advanced Ads on HTTPS only and can not confirm this.

    My best guess right now would be that your HTTPS setup is partially incorrect. Do other JS files load fine?

    Are you using a plugin to enable HTTPS or one to optimize such files?

    Thanks
    Thomas

    Plugin Author Thomas Maier

    (@webzunft)

    Hi rcwatson, have you been able to resolve this?

    Thomas

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Insecure http used instead of https’ is closed to new replies.