Jump to content

Archived

This topic is now archived and is closed to further replies.

fourdw

Running SSL Compiled Pagelines CSS

Recommended Posts

fourdw+    1
fourdw

Hi

 

I've read previous posts and implemented the following in my child theme functions.php

add_action( 'pl_force_ssl', '__return_true' );

 

I can see in the home page source code this has changed:

 

<link rel="stylesheet" id="pagelines-less-css" href="https://www.****.com/wp-content/themes/pagelines/pagelines-compiled-css-1_1404211105/" type="text/css" media="all">

 

But when I /checkout (WooCommerce) it's still not loading (blocked) and Chrome is still saying it should be run over https://

 

 

Any help greatly appreciated.

 

Share this post


Link to post
Share on other sites
greenfly    230
greenfly

When you create your topic you are asked for the following information which we need to help you. Could you provide this please? 

 

Remember to include as much information about your technical issue as possible for example:
Website URL:
Framework Version:
WordPress Version:
Plugins in Use:
Server/Host:
Screenshots:
Details:


The answer to many issues can be found by searching in the forum before posting as someone else  may very well have had the same problem before you have.  Also, reading the documentation can help you gain a good understanding of how everything works. 

 

Please do not send me private messages. Occam's razor - The principle states "Keep things simple!"

Share this post


Link to post
Share on other sites
fourdw+    1
fourdw

Here's the additional information (I should have included):

 

http://www.santonesse.com/ (Adult theme!)

Pagelines: 2.4.5

Plugin: Woocommerce

 

 

 

 

 

Share this post


Link to post
Share on other sites
fourdw+    1
fourdw

Thanks CliffordP

 

That seems to enable https://

<link rel='stylesheet' id='pagelines-less-css' href='https://www.santonesse.com/wp-content/themes/pagelines/pagelines-compiled-css-1_1404217600/' type='text/css' media='all' />

As did:

add_action( 'pl_force_ssl', '__return_true' );

But:

But Chrome still thinks it's http:// on the checkout page: https://www.santonesse.com/checkout/ but only on Chrome.

[blocked] The page at 'https://www.santonesse.com/checkout/' was loaded over HTTPS, but ran insecure content from 'http://www.santonesse.com/wp-content/themes/pagelines/pagelines-compiled-css-1_1404217600/': this content should also be loaded over HTTPS.

 

Help!

 

Share this post


Link to post
Share on other sites
fourdw+    1
fourdw

This is odd, but I've unticked:

Un-force HTTPS when leaving the checkout

in the WooCommerce settings and it seems to load the CSS now?

 

 

Share this post


Link to post
Share on other sites
Simon    247
Simon

You need to filter the LESS variables too. If you are going to have just one page as SSL all the CSS urls will need to be SSL or protocol relative.

 

add_action( 'pl_force_ssl', '__return_true' );

add_filter( 'pless_vars', 'make_ssl_vars' );
function make_ssl_vars( $vars ) {
    $vars['plSectionsRoot'] = str_replace( 'http://', '//', $vars['plSectionsRoot'] );
    $vars['plRoot'] = str_replace( 'http://', '//', $vars['plRoot'] );
    return $vars;
}

Share this post


Link to post
Share on other sites
fourdw+    1
fourdw

Many thanks for all your help. All seems to be working now.

  • Like 1

Share this post


Link to post
Share on other sites
greenfly    230
greenfly

Thank you for letting us know. 


The answer to many issues can be found by searching in the forum before posting as someone else  may very well have had the same problem before you have.  Also, reading the documentation can help you gain a good understanding of how everything works. 

 

Please do not send me private messages. Occam's razor - The principle states "Keep things simple!"

Share this post


Link to post
Share on other sites

×