Mixed Content Error in JS Console

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Mixed Content Error in JS Console

This topic contains 5 replies, has 2 voices, and was last updated by Rohit Manglik Rohit Manglik 7 years, 3 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #11491
    Rohit Manglik
    Rohit Manglik
    Participant

    Hi Again,

    Almost all the previous tickets are resolved. Thanks for your continued support

    I am getting this error in JS Console:
    Mixed Content: The page at ‘https://edugorilla.com/’ was loaded over HTTPS, but requested an insecure stylesheet ‘https://edugorilla.com/wp-content/uploads/asp_upload/search1.css?mq=laSQOB’. This request has been blocked; the content must be served over HTTPS.

    Because of this error, the CSS file is not loaded and in top right corner of Chrome we get message that “this site is trying to load script from unknown sources”.

    Thanks

    #11516
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    The plugin uses the default wp_enqueue_styles() method to include the styles, which uses the plugin_dir_url(__FILE__) core wordpress function. This returns the URLs as set on the site settings page.

    In case you recently transitioned from simple http to ssl, make sure to change the site URL on the back-end, in the wp-config.php file as well as clearing all layers of caches. Unfortunately I’m not aware of any kind of https related issues, as the plugin itself is developed and tested on a SSL enabled environment. Usually the error is the cache or the incorrect site url option, I would recommend checking those first.

    There are also two very handy methods to ensure site URL change as described in the wordpress codex: https://goo.gl/8CZuNF

    I usually use these constants in the wp-config.php to prevent any mistakes:

    define('WP_HOME','http://example.com');
    define('WP_SITEURL','http://example.com');
    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #11556
    Rohit Manglik
    Rohit Manglik
    Participant

    Hi Ernest,

    I made above changes and also using Really Simple SSL plugin to cover some boundary conditions.

    I tested it with WP Rocket and Better WordPress Minify and they are unable to detect a few ASP files. IMHO they are added through javascript (2-3 of them).

    I can see two files: edugorilla.com/wp-content/uplaods/asp_uploads/search1.css and edugorilla.com/wp-content/uplaods/asp_uploads/search2.css that might not be added through wp_enqueues_styles. It’s just my best guess as they are not minified.

    These requests are made through http in above issue.

    Sorry for incomplete update, I will get back with more debugging information.

    Thanks

    #11656
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Sorry, I have missed this ticket by accident.

    Those files are not used, unless the conditional CSS loader script is enabled, but since you are using a custom cache I highly recommend turning it off. Do to that go to the Compatibility Options submenu: https://i.imgur.com/AJutM6a.png

    After that, clear the cache, and those files won’t be loaded anymore on page load.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #11664
    Rohit Manglik
    Rohit Manglik
    Participant

    Thanks for details Ernest.

    This issue is linked with 9): https://wp-dreams.com/forums/topic/9-incompatible-with-wp-rocket/#post-11657 now.

    I will get back once that issue is rectified.

    Thanks

    #11668
    Rohit Manglik
    Rohit Manglik
    Participant

    The fix worked with me.

    Thanks Ernest.

    Please close the ticket.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Mixed Content Error in JS Console’ is closed to new replies.