Jump to content

Archived

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

Dave2

DMS2 loading homeepage css as https when page is accessed at http.

Recommended Posts

Dave2
I have the pagelines-dms-force-ssl-https active on my site. I run mostly regular (http) connection, and switch to https when members are logged in or new subscribers are entering credit card data. 
 
 
I have noticed that, as you can see below, that Pagelines is loading two CSS resources with https when the the home page is loaded over http. This, as you all know, breaks a few features on the home page. In this case the social media icons and the drop down menu symbols. 
 
I would like Pagelines load correctly regardless of the protocol. 
 
<link rel='stylesheet' id='pagelines-less-core-css' href='https://**REDACTED**.com/wp-content/uploads/pagelines/compiled-css-core-1414350841.css' type='text/css' media='all'/>
<link rel='stylesheet' id='pagelines-less-sections-css' href='https://**REDACTED**.com/wp-content/uploads/pagelines/compiled-css-sections-1414350841.css' type='text/css' media='all'/>

Share this post


Link to post
Share on other sites
Danny

Hi,

 

We are going to need a link to the site in question, along with info on how you have setup your SSL. Can you also please enable DMS debug mode please.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Dave2

I have placed DMS in debug mode and deactivated Cloudflare. You should be good to go. The site is http://winetastingtrends.com/.

 

The WordPress site and home URLs are all set to http, the SSL is just the standard SSL config--meaning it is set on the server and available should anyone want to load the site via https. I only force SSL when members are entering credit card data.

 

Let me know what else you need.

 

Share this post


Link to post
Share on other sites
Danny

OK, so I have viewed your site and found that the you do indeed have an issue with your compiled CSS loading from http instead of https. However, PageLines.com works just fine, we run the same version of yourself i.e. 2.1.8. Therefore, the issue has to be caused by either how you have setup your SSL or you have plugins, server configuration causing the issue. I noticed that DMS debug mode isn't working either.

Therefore, can you please enable debug mode please. If you have enable the option and it isn't working, then this points to either CloudFlare causing an issue or your server.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Dave2

Danny:

 

I turned off all plugins and the ?pldebug=1 syntax is not working. I did the same on my development system and I have the same issue, not able to turn on pagelines debug, even though it claims it was saved. 

 

My thoughts on the issue is that the pageline stylesheet urls with ids pagelines-less-core-css and pagelines-less-sections-css are not being filtered by the pless_vars filter. Either that or the array being returned by the pagelines-dms-force-ssl-https plugin is not being used when generating the css urls.

 

I say this as they, as I would expect, not appearing in the protocol-less "//winetastingtrends.com...." as I would expect them to be doing when using the  pagelines-dms-force-ssl-https plugin.

 

By the way, I just noticed that the pagelines recompiled the script, and now they are loading as http, when I raised this issue the pagelines compiled css was loading via https. Either way, they are loading with protocol and they should be loading without.

 

Cloudflare is deactivated at this time.

Share this post


Link to post
Share on other sites
Simon

are you logged in via ssl when in the admin?

 

Also you keep referring to the pagelines ssl plugin, what is that?

Share this post


Link to post
Share on other sites
Dave2

Simon_P:

 

I have log in either way. I suspect that Pagelines is looking at how I am logged in when compiling the css. Not really a good idea when a website can be used in either mode (http or https).

 

The plugin I am referring to is called pagelines-dms-force-ssl-https and is found at http://www.pagelinestheme.com/pagelines-dms-ssl-https/. I have tried using it to strip the http off of the pagelines css so that I can run either http of https. Clearly it is not working. 

 

It really seems that I either have to run the entire site with or without ssl--which is not what I want to do.

Share this post


Link to post
Share on other sites
Simon

You site should not work on either, you cant log into both http and https because cookies will not work cross domain. Thats why WordPress allows you to have either http of https not both at the same time.

Your plugin should be allowing certain pages to load via https. 

 

Anyway, thats beside the point, as I have no idea how your server is configured to serve both, and thats beyond the scope of a simple support forum post.

 

The plugin you linked to above is clearly not enabled otherwise your css urls would be https all the time.

 

What plugin are you using for the secured pages? We dont have any issues like this with woocommerce.

Share this post


Link to post
Share on other sites
Dave2

Simon_p:

 

I just realized that the solution is simply to add a filter on pl_dynamic_css_url as that will correct the url on the fly, which is what I need. I have already tested this on my test system and it works perfectly. 

 

Perhaps I asked my question wrong in the first place, as I am not doing anything at all unusual. But I am happy to see that your guys have already added the filter that I need. 

 

Dave

Share this post


Link to post
Share on other sites
Dave2

For those that run into this issue, my solution was adding the following filter. This ensures that the pagelines css loads regardless of the website's mode (http or https).

add_filter( 'pl_dynamic_css_url', 'strip_protocol_pl_stuff' );
function strip_protocol_pl_stuff( $url ) {
    $url = str_replace( array('http://', 'https://'), '//', $url );
    return $url;
}
 

Share this post


Link to post
Share on other sites
jmorby

Hi .. daft question, but where exactly do we add that filter code ?

Share this post


Link to post
Share on other sites

  • Similar Content

    • marshallsolutions
      By marshallsolutions
      For the site https://marshallsirishpub.com I am running
      Wordpress 4.9.4
      Pagelines base theme 1.0.2
      Pagelines Framework 2.5.0
      The share bar specifically Stumble Upon is causing an error when checking SSL for HTTPS at whynopadlock.com.  Here is the errors shown:
      A file with an insecure url of "http://cdn.stumble-upon.com/js/badge_su.js?v=20120613" was loaded on line: 1 of https://www.stumbleupon.com/badge/embed/2/?url=https%3A%2F%2Fmarshallsirishpub.com%2F.
      A file with an insecure url of "http://cdn.stumble-upon.com/css/badges_su.css?v=20120613" was loaded on line: 1 of https://www.stumbleupon.com/badge/embed/2/?url=https%3A%2F%2Fmarshallsirishpub.com%2F.

      Errors that are reported on line 1 are generally not part of the source code. This error may be caused by an external javascript file which is writing to the page, however we are unable to reliably detect these scripts in our automated test.
      Please contact us using the "Need Help?" link below if you need assistance with resolving this error.
      I contacted support at Really Simple SSL which is the plugin we use to convert the site to HTTPS via SSL.  They said I should contact you guys.  Here is what their support had to say via email:
      the sharing bar seems to load the Stumbleupon script over http:// despite being trying to redirect it to https://. The cdn.stumbleupon doesn't seem to have an SSL certificate and therefore refuses to load over https://. I'd suggest to contact the developer of the sharing plugin, the Stumbleupon button can de designed in another way, without it trying to load a script over http://.
      So it seems I need to modify some file in pagelines to make the stumble upon portion of the share bar to read https and not http.  If that's not possible then I need to remove stumble upon from the share bar.
      Thanks.
    • yemoonyah
      By yemoonyah+
      Hi, even though I just got a SSL certificate, I can't get the green padlock to appear due to the following error:
      :A file with an insecure url of "http://yemoonyah.com/wp-content/plugins/pl-section-boxes/check.svg" was loaded via the javascript file: https://yemoonyah.com/wp-includes/js/jquery/jquery.js?ver=1.12.4 on line 3. The insecure URL may not be directly contained in the script file and may exist elsewhere."
      I figured if I delete and re-install the plugin it might fix the problem but will my boxes on the website still be there? Or do I have to redesign everything all over again if I delete the plugin and then re-install it?
    • israelgenealogy
      By israelgenealogy
      I have an old PageLines site that I recently got working with SSL, but there are mixed content errors. There are two problems I've found. One is the search button icon called from forms.less:
      url(@{plRoot}/images/[email protected])
      The second is when PageLines loads FontAwesome from icons.less:

      url('@{iconFont}.eot?v=3.0.1');

      Where is similarly loads the font using http. Any idea why these are loading using http instead of https, and is there a simple way to fix these? I know I need to upgrade the theme, but it's a major project, so for the moment I'd just like to get these secured before taking on switching themes/frameworks.
    • Dan Haddock
      By Dan Haddock
      Plugins Active and installed: 
      Akismet Anti-Spam
      Coming Soon Page & Maintenance Mode by SeedProd
      Contact Form 7
      Cookie Law Info
      DMS Professional Tools  
      Enhanced Media Library  
      Flamingo
      Google Analytics for WordPress by MonsterInsights
      Google XML Sitemap
      Jetpack by WordPress.com
      Legull 
      Loginizer   
      MailChimp for WordPress
      PageLines Updater    
      Schema App Structured Data 
      Sucuri Security - Auditing, Malware Scanner and Hardening
      Uber reCaptcha    
      Yoast SEO
      Wordpress Version: 4.8.1
      Pagelines Version: 2.2.4
       
      Good Evening/Afternoon or Morning, 
      I am running into a problem with CSS styling not applying inside of most browsers (Safari, Firefox) when I am logged in to wordpress, and all browsers that I have tested when I am logged off and the site has been made public (Chrome, Firefox and Safari).
      As a result, I have managed to identify the probable cause. It looks as though these browsers are refusing to render my sites compiled CSS file due to it being a HTTP URL rather than HTTPS.
      I have attempted to change this URL to HTTPS in my browser, however it brings back an ERROR: File not found page - https://www.shortfilmblog.com/wp-content/uploads/pagelines/compiled-css-core-1505847507.css
      What would you suggest in this regard? Would this be resolvable from your end?
      Happy to provide any further details required.
×