Viewing 11 replies - 16 through 26 (of 26 total)
  • Thanks for the follow up! I do two things beyond the default setup:

    1) I am checking off this option: “Clear the complete cache if a new post has been published (instead of only the home page cache).”

    2) And enabling “HTML & Inline JS” minification.

    I’m not sure how often it is occurring is the problem, mostly because I tend to visit my own website sporadically. I’ll do the screen grab if I catch it again.

    I am running into this same issue with Cache Enabler. It randomly generates some pages with mixed content. It looks like it is urls generated by wp_enqueue_script. I don’t have any rules in my .htaccess relating to SSL but my WordPress Address and Site Address are both set to https.

    Can you provide me with a screenshot of your browser’s Console tab if this occurs again?

    Sure, here’s a screen shot:
    https://imgur.com/a/GUXgy

    Feel free to visit the url directly too (in Safari):
    https://honestlyyum.com/15960/black-sesame-banana-bread/

    @abecoffman, do you have a redirect in place to point your HTTP URLs to HTTPS? I checked the browser console for your site and it looks like your site is calling a few assets over HTTP. I then checked those assets directly and they are returning a 200OK meaning there is no redirect.

    This guide shows all the steps required to complete an HTTP to HTTPS migration if that helps: https://www.keycdn.com/blog/http-to-https/

    That’s not the problem. Cache Enabler is building the cached page with HTTP urls in the HTML. If I visit the page when I am logged in (I don’t get the cached page) then it works fine, and all of the urls in the HTML are HTTPS.

    So this is definitely an issue with either the plugin or wordpress.

    I’m trying to replicate the issue on a test instance but have been unsuccessful so far. A couple of questions:

    1. Are you using any sort of SSL plugin as others have mentioned (Really Simple SSL) for example?

    2. If you clear the cache is the issue resolved for a certain period or does it occur again immediately once the cache builds again?

    3. Have you tried testing this with another caching plugin? If so, are you able to reproduce the issue?

    As I also had the exact same problem, and the same results mixed content output, I thought I would weigh in. And I fully agree with @abecoffman, when logged in / cache cleared the site is fully HTTPS, no mixed content (HTTP paths anywhere).

    To answer the questions in my case:
    1) I was not using any SSL plugins
    2) No, the issue only occurs again after a period of time. As in usually a days / weeks.
    3) Yes, the site works perfectly with WP Super Cache

    Hope that helps!

    1) I am not using any SSL plugins
    2) I haven’t yet discovered consistency in how/when the issue occurs
    3) I haven’t tried WP Super Cache

    I just ran some tests on a test site and was only able to reproduce the issue when I removed my site’s redirect in .htaccess:

    
    RewriteCond %{HTTP:X-Forwarded-Proto} !=https
    RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=302,L]
    

    Once this was removed I could replicate the issue by navigating to the HTTP version of the site which gets cached by CE. Then, once I try going to the HTTPS version it delivers the cache from the HTTP site which creates mixed content issues. For curiosity’s sake, can you try adding a redirect for any HTTP assets to use HTTPS instead (this should be done regardless).

    As for Super Cache, I tested that as well and it looks like they create separate files based on the protocol used: index.html for HTTP and index-https.html for HTTPS. Cache Enabler however does not, it assumes you are using either HTTP or HTTPS, not both.

    • This reply was modified 6 years, 8 months ago by codyarsenault.

    That seems to have fixed my problem. With that said, I would recommend taking a similar approach to Super Cache with your plugin, and creating separate files for each protocol. Thanks for the help.

Viewing 11 replies - 16 through 26 (of 26 total)
  • The topic ‘Enabling cache-enabler causes mixed content over https’ is closed to new replies.