• 0

Running SSL Compiled Pagelines CSS


Question

Posted · Report post

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

10 answers to this question

  • 0

Posted · Report post

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
  • 0

Posted · Report post

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:

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

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
  • 0

Posted · Report post

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
  • 0

Posted · Report post

Simon_P

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

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
  • 0

Posted · Report post

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

1 person likes this

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thank you for letting us know. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now