Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML Compression does not work with SSL #348

Closed
petehannam opened this issue Oct 8, 2014 · 9 comments
Closed

HTML Compression does not work with SSL #348

petehannam opened this issue Oct 8, 2014 · 9 comments

Comments

@petehannam
Copy link

Hi,

We've been running Quick Cache Pro successfully for a while now. Over the weekend we moved the site from HTTP to HTTPS (i.e. added an SSL cert to the server).

With Quick Cache's HTML compression turned off, everything works fine. However, we found the site broke if we enabled any of the following options. By 'broke' I mean that the CSS and/or JS resources didn't load.

  • "Combine CSS from and into fewer files"
  • "Combine JS from into fewer files"

Thanks,
Pete

@lkraav
Copy link

lkraav commented Oct 8, 2014

Any mixed content security errors visible in the browser?

@petehannam
Copy link
Author

Sorry that information would've been helpful information up-front.

No, there are no security issues and looking at the HTML the CSS/JS does seem to be on the right URL/scheme and the files exist from what I can see.

@jaswrks
Copy link

jaswrks commented Oct 8, 2014

@petehannam Are you by any chance running a CDN plugin of any kind; like the one for CloudFlare? There are some known issues being worked out with CloudFlare and the HTML compressor, and this might explain the issue, at least in part.

Also, can you provide a link to a page where this occurs, or paste a few of the dead links? Just in case they might shed some light. Thanks for reporting!

@petehannam
Copy link
Author

I'm running the site through Cloudflare but I don't have the plugin installed. The issue happens with Cloudflare in dev mode and I think it happened when we weren't running through Cloudflare whilst we were installing the SSL cert. I'd be happy to move off Cloudflare if that will help with your investigations.

The website is https://londonfrontrunners.org/

I've turned on the HTML compression settings that breaks things and have put Cloudflare into dev mode. I'll leave it this way for two hours (i.e. until ~15:00 BST).

@jaswrks
Copy link

jaswrks commented Oct 8, 2014

Taking a look, thank you.

@jaswrks
Copy link

jaswrks commented Oct 8, 2014

Hmm... I see the CSS/JS resources are loading OK over https://, but it would appear there is some corruption in the CSS files; i.e. there is CSS missing from the final compressed copies.

Can you please enable the full debugging notes in Quick Cache for me? Then run a fresh test and see what you get in the HTML source code notes that Quick Cache leaves. You'll should get a bunch of debugging output in the comments at the bottom of your HTML doc. If you paste those in that'd be great :-)

2014-10-08_05-08-49

@petehannam
Copy link
Author

Quick Cache HTML Compressor took 0.00647 seconds compiling CSS tag frags in checksum: '9d7a03a6f635d3cb38e19ee8cc5f003f'.
Quick Cache HTML Compressor took 0.06718 seconds fetching remote resource: 'http://londonfrontrunners.org/wp-content/plugins/wordpress-bootstrap-css/resources/bootstrap-3.2.0/css/bootstrap.css'.
Quick Cache HTML Compressor took 0.06896 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/plugins/all-in-one-event-calendar/cache/7fb9ee0a_ai1ec_parsed_css.css?ver=2.1.5'.
Quick Cache HTML Compressor took 0.07293 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/uploads/smile_fonts/Defaults/Defaults.css?ver=4.0'.
Quick Cache HTML Compressor took 0.08970 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/plugins/revslider/rs-plugin/css/settings.css?rev=4.5.95&ver=4.0'.
Quick Cache HTML Compressor took 0.06851 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/plugins/tablepress-datatables-column-filter-widgets/css/ColumnFilterWidgets.css?ver=1.2'.
Quick Cache HTML Compressor took 0.05763 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/plugins/tablepress-datatables-tabletools/css/TableTools.min.css?ver=2.1.5'.
Quick Cache HTML Compressor took 0.07472 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/plugins/woocommerce/assets/css/chosen.css?ver=4.0'.
Quick Cache HTML Compressor took 0.08431 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/plugins/js_composer/assets/css/js_composer.css?ver=4.3.4'.
Quick Cache HTML Compressor took 0.08590 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/plugins/vc-pricing-box/assets/pricing-box-frontend.css?ver=4.0'.
Quick Cache HTML Compressor took 0.10132 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/themes/parallelus-vellum/extensions/ubermenu/lite/styles/basic.css?ver=2.3.0.0-LITE'.
Quick Cache HTML Compressor took 0.12361 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/themes/parallelus-vellum/assets/css/ubermenu.lite.css?ver=2.3.0.0-LITE'.
Quick Cache HTML Compressor took 0.10746 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/plugins/tablepress/css/default.min.css?ver=1.4'.
Quick Cache HTML Compressor took 0.09446 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/uploads/js_composer/custom.css?ver=4.3.4'.
Quick Cache HTML Compressor took 0.10742 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/themes/parallelus-vellum/style.css?ver=4.0'.
Quick Cache HTML Compressor took 0.12361 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/themes/parallelus-vellum/style-skin-1.css?ver=4.0'.
Quick Cache HTML Compressor took 0.11471 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/themes/parallelus-vellum/assets/css/fonts.css?ver=4.0'.
Quick Cache HTML Compressor took 0.10865 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/themes/parallelus-vellum/assets/css/colorbox.css?ver=4.0'.
Quick Cache HTML Compressor took 0.07903 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/plugins/foobar/css/foobar.2.6.css?ver=2.5.7'.
Quick Cache HTML Compressor took 0.06177 seconds compressing CSS w/ checksum: '1767f1b4636de8f8798f88d47ae23f33'.
Quick Cache HTML Compressor took 0.00025 seconds compressing CSS w/ checksum: 'aad5bec3bb26bb15d564e4c9a9505ae5'.
Quick Cache HTML Compressor took 0.00299 seconds compressing CSS w/ checksum: 'fd760789dd076ff8fc9aadd0e665a7df'.
Quick Cache HTML Compressor took 1.74445 seconds building parts based on CSS tag frags in checksum: '19acad5499c6aa0f0dcf561bfd3dcd6d'.
Quick Cache HTML Compressor took 1.75679 seconds compressing/combining head/body CSS in checksum: 'f222f5b0bcde7f06ab273b4f06458715'.
Quick Cache HTML Compressor took 0.00170 seconds compiling JS tag frags in checksum: 'db6f53389b53e6638b2538e33b11b2f2'.
Quick Cache HTML Compressor took 0.08782 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-includes/js/jquery/jquery.js?ver=1.11.1'.
Quick Cache HTML Compressor took 0.09860 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.2.1'.
Quick Cache HTML Compressor took 0.10550 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/plugins/revslider/rs-plugin/js/jquery.themepunch.tools.min.js?rev=4.5.95&ver=4.0'.
Quick Cache HTML Compressor took 0.11432 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/plugins/revslider/rs-plugin/js/jquery.themepunch.revolution.min.js?rev=4.5.95&ver=4.0'.
Quick Cache HTML Compressor took 0.10666 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/plugins/woocommerce-gateway-fees/checkout.js?ver=4.0'.
Quick Cache HTML Compressor took 0.10452 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/themes/parallelus-vellum/assets/js/modernizr-2.7.1-respond-1.4.0.min.js?ver=2.7.1'.
Quick Cache HTML Compressor took 0.08367 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/plugins/foobar/js/jquery.foobar.2.4.min.js?ver=2.5.7'.
Quick Cache HTML Compressor took 0.00886 seconds compressing JS w/ checksum: '1c03f25414911cd41e55dddd8379d36b'.
Quick Cache HTML Compressor took 0.73648 seconds building parts based on JS tag frags in checksum: '68e6d112c40b5c3067c7cd378e674af1'.
Quick Cache HTML Compressor took 0.73905 seconds compressing/combining head JS in checksum: '66b4fadaef6f9e31be8a696349186421'.
Quick Cache HTML Compressor took 0.00237 seconds compiling JS tag frags in checksum: '3801057edd5428785cb7d4e9a82f7bae'.
Quick Cache HTML Compressor took 0.08439 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/themes/parallelus-vellum/extensions/ubermenu/core/js/ubermenu.min.js?ver=4.0'.
Quick Cache HTML Compressor took 0.08731 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/themes/parallelus-vellum/extensions/ubermenu/core/js/hoverIntent.js?ver=4.0'.
Quick Cache HTML Compressor took 0.08059 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/plugins/jetpack/modules/photon/photon.js?ver=20130122'.
Quick Cache HTML Compressor took 0.07574 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/plugins/uk-cookie-consent/js/uk-cookie-consent-js.js?ver=1.8'.
Quick Cache HTML Compressor took 0.08381 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/plugins/woocommerce/assets/js/chosen/chosen.jquery.min.js?ver=1.0.0'.
Quick Cache HTML Compressor took 0.06808 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/plugins/woocommerce/assets/js/frontend/chosen-frontend.min.js?ver=2.2.5'.
Quick Cache HTML Compressor took 0.67175 seconds fetching remote resource: 'https://secure.gravatar.com/js/gprofiles.js?ver=2014Octaa'.
Quick Cache HTML Compressor took 0.08830 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/plugins/jetpack/modules/wpgroho.js?ver=4.0'.
Quick Cache HTML Compressor took 0.10643 seconds fetching remote resource: 'https://s0.wp.com/wp-content/js/devicepx-jetpack.js?ver=201441'.
Quick Cache HTML Compressor took 0.08822 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/themes/parallelus-vellum/assets/js/jquery.jplayer.min.js?ver=2.5.0'.
Quick Cache HTML Compressor took 0.08580 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/themes/parallelus-vellum/assets/js/jquery.isotope.min.js?ver=1.5.25'.
Quick Cache HTML Compressor took 0.07365 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/themes/parallelus-vellum/assets/js/onLoad.js?ver=1.0'.
Quick Cache HTML Compressor took 0.05084 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/themes/parallelus-vellum/assets/js/jquery.nicescroll.min.js?ver=3.5.4'.
Quick Cache HTML Compressor took 0.05662 seconds fetching remote resource: 'https://londonfrontrunners.org/wp-content/plugins/js_composer/assets/js/js_composer_front.js?ver=4.3.4'.
Quick Cache HTML Compressor took 0.14350 seconds compressing JS w/ checksum: 'b9d37387b42262f7bd059679c841d49d'.
Quick Cache HTML Compressor took 1.87355 seconds building parts based on JS tag frags in checksum: '40bb54fbccee9079de5e84b7b6eea2a9'.
Quick Cache HTML Compressor took 1.87692 seconds compressing/combining footer JS in checksum: 'f0841f69ac83c9b819c44a4f0cb54f4c'.
Quick Cache HTML Compressor took 0.00405 seconds compiling JS tag frags in checksum: '6052ad90b473aa22ccf5d4d49a05dd54'.
Quick Cache HTML Compressor took 0.01359 seconds compressing inline JS in checksum: 'a72b5ef7534a73f2f999bbe6a3269e33'.
Quick Cache HTML Compressor took 0.00528 seconds compressing HTML w/ checksum: '8a9ee4d34128c384992d63f166fe5516'.

Quick Cache HTML Compressor took 4.39220 seconds (overall).
Quick Cache file path: /cache/quick-cache/cache/https/londonfrontrunners-org/index.html
Quick Cache file built for (https://londonfrontrunners.org/) in 5.35137 seconds, on: Oct 8th, 2014 @ 1:12 pm UTC.
This Quick Cache file will auto-expire (and be rebuilt) on: Oct 10th, 2014 @ 1:12 pm UTC (based on your configured expiration time).
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Quick Cache fully functional :-) Cache file served for (https://londonfrontrunners.org/) in 0.00461 seconds, on: Oct 8th, 2014 @ 1:12 pm UTC.

@raamdev
Copy link
Contributor

raamdev commented Mar 31, 2015

Related GitHub Issue

Noting here that there's another GitHub Issue (#413) related to this one. I'm closing this GitHub issue in favor of the other one, as there's a bit more insight in that issue regarding where the problem may be.


@petehannam Could you leave a comment on #413 and let me know if you were using the CloudFlare Minify & Compression features while also trying to use the HTML Compressor? If you were, that might explain the conflict.

@raamdev raamdev closed this as completed Mar 31, 2015
@wpsharks wpsharks locked and limited conversation to collaborators Mar 31, 2015
@raamdev
Copy link
Contributor

raamdev commented Sep 24, 2015

@petehannam Thank you for your patience on this issue. We've identified a fix that we believe resolves the problem you described here. The following will be released with the next ZenCache Pro release:

  • Bug Fix: Fixed an SSL issue with the HTML Compressor that was causing problems in some hosting environments where the hosting server was incorrectly setting $_SERVER['REQUEST_SCHEME'] to http even when the WordPress Site URL and Home URL were set to use https://. As a result of this improper server configuration, the combined CSS/JS files generated by the HTML Compressor were being served over HTTP even when a site was configured to use HTTPS. This release applies a workaround for this improper server configuration that no longer looks at $_SERVER['REQUEST_SCHEME']. See Issue #413 and Issue #73.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants