Jump to content


Photo
- - - - -

Running SSL Compiled Pagelines CSS

complied

Best Answer Simon_P , 01 July 2014 - 05:10 PM

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;
}

Go to the full post


  • Please log in to reply
10 replies to this topic

#1 fourdw

fourdw

    Advanced Member

  • Members

  • 31 posts
  • Country: Country Flag

Posted 01 July 2014 - 10:47 AM

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.

 



#2 greenfly

greenfly

    Advocate

  • Members

  • 3268 posts
  • LocationManchester, England
  • Framework Version:latest
  • Country: Country Flag

Posted 01 July 2014 - 12:18 PM

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:



#3 fourdw

fourdw

    Advanced Member

  • Members

  • 31 posts
  • Country: Country Flag

Posted 01 July 2014 - 12:41 PM

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

 

Please Login or Register to see this Hidden Content

(Adult theme!)

Pagelines: 2.4.5

Plugin: Woocommerce

 

 

 

 

 

Attached Files



#4 CliffordP

CliffordP

    Advocate

  • Members


  • 474 posts
  • LocationOklahoma
  • Country: Country Flag

Posted 01 July 2014 - 01:54 PM

Please Login or Register to see this Hidden Content



#5 fourdw

fourdw

    Advanced Member

  • Members

  • 31 posts
  • Country: Country Flag

Posted 01 July 2014 - 02:21 PM

Thanks @

Please Login or Register to see this Hidden Content

 

That seems to enable https://

<link rel='stylesheet' id='pagelines-less-css' href='

Please Login or Register to see this Hidden Content

' 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:

Please Login or Register to see this Hidden Content

but only on Chrome.

[blocked] The page at '

Please Login or Register to see this Hidden Content

' was loaded over HTTPS, but ran insecure content from '

Please Login or Register to see this Hidden Content

': this content should also be loaded over HTTPS.

 

Help!

 



#6 CliffordP

CliffordP

    Advocate

  • Members


  • 474 posts
  • LocationOklahoma
  • Country: Country Flag

Posted 01 July 2014 - 02:22 PM

@

Please Login or Register to see this Hidden Content



#7 fourdw

fourdw

    Advanced Member

  • Members

  • 31 posts
  • Country: Country Flag

Posted 01 July 2014 - 02:55 PM

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?

 

 



#8 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 01 July 2014 - 05:10 PM   Best Answer

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;
}



#9 CliffordP

CliffordP

    Advocate

  • Members


  • 474 posts
  • LocationOklahoma
  • Country: Country Flag

Posted 02 July 2014 - 02:28 PM

@

Please Login or Register to see this Hidden Content

, I see what you did now (I was mobile before and didn't look that closely). Just install this plug-in and it will do what Simon said: 

Please Login or Register to see this Hidden Content



#10 fourdw

fourdw

    Advanced Member

  • Members

  • 31 posts
  • Country: Country Flag

Posted 04 July 2014 - 09:43 AM

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


  • CliffordP likes this

#11 greenfly

greenfly

    Advocate

  • Members

  • 3268 posts
  • LocationManchester, England
  • Framework Version:latest
  • Country: Country Flag

Posted 04 July 2014 - 09:48 AM

Thank you for letting us know.