• 0

DMS 2 HTTPS Mixed Content Issues

Question

Posted · Report post

On the old Pagelines and DMS 1 theme, this wasn't an issue, I'm looking for a fix or work around.

 

I have a bunch of pages on my site that have forms, I have an SSL and push HTTPS on those pages. Now, using DMS 2, those pages show with no CSS because my browser, and most modern browsers do not show mixed content, and for whatever reason DMS 2 isn't picking up on that fact this page is pushing HTTPS, and should be loading the CSS files from HTTPS ... I don't know the technical reasonings for this, perhaps due to caching, or hard coded HTTP, but how do I report this, work around it, or get it fixed?

 

See example here: http://bit.ly/1ihWoDb

Share this post


Link to post
Share on other sites

23 answers to this question

  • 0

Posted · Report post

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

Hi,

 

I am by no means an expert when it comes to https, but how have you set up your SSL site. I have viewed our source code and I can not see (unless I've missed it) any hardcoded http://. The uploads folder for compiled CSS, is definitely something on your end as far as I can tell, as I remember viewing another users website Hibbs trust I think, and there compiled CSS was SSL.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Well, despite the page being called in HTTPS, this is what shows in the the page source...

 

I am showing page source with https://itarsenal.com/contact

 

All the other scripts and on page items pull as HTTPS, but not these which are "compiled" DMS CSS files

 

http://bit.ly/1jRMcBk

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

The issue appears to be your uploads folder, I am by no means an expert with this, but I have seen other users sites have no issue with compiled CSS when using SSL. So it has to be related to your end in my opinion. Have you read this article by Cliff, it may help.

 

http://www.pagelinestheme.com/pagelines-dms-ssl-https/

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

This is exactly my issue, which means there's definetly an issue when using Pagelines DMS and WPEngine over SSL. Thank you.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Quite an old question this gist will help:

https://gist.github.com/cliffordp/6902783

DMS uses the site_url for those css urls

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Do you know if this has been rolled in to a current release, or I still have to do this? I've noticed this only works when I have ALL of the WP set to HTTPS, not in the case where I just want to called HTTPS on a few pages. Frustrating that DMS 2 won't just "work" with all hosts, like most other themes.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Nothing has changed. DMS uses the current site url to determine all the urls used in the CSS. It is compiled once then saved as a file. The best way is to force all the css urls to be HTTPS using the plugin provided above so that both non-ssl and ssl pages use the same CSS.

 

Most other themes use a static css file. You will get this issue regardless of your host unless you set the site as ssl.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

The plugin causes a break that doesn't allow the front editor to work, been troubleshooting it for a week. Bummer.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

If you're receiving an error its best to speak to the author the plugin Clifford P which I just mentioned so he will be notified.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I am in communication via email with itarsenal

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks yes, the plugin isn't as applicable, as I'm not running HTTPS throughout the entire site, there's a certificate installed, and I want to load only certain pages with HTTPS...when I do this, using DMS 2, and WP Engine, this is the result http://take.ms/CkYBE - no CSS

 

Is there an easy few lines I can put into .htaccess or the functions.php to force the CSS files to load from HTTPS vs, the plugin, which causes an ajax front end editor issue for me?

 

-r

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

You saint you. Thank you.

 

I haven't tested extensively but from the few https pages I pulled up, the CSS actually loads. There are still a few mixed content errors in images and what not, but I can fix those I believe and slowly work through my site. Thank you!

1 person likes this

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Awesome, happy to hear the issue has been resolved.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Does this mean any change in the code you gave me? I now found out that the sections just hang on "loading" when trying to make updates now...took me a while to figure out that was problem, I started a thread here: http://forum.pagelines.com/topic/35709-dms-2-wp-engine-no-plugins-not-working-loading-stuck/?p=211514

 

Also chatted with WP Engine which I guess I can cancel. Bummer.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

itarsenal, the code Simon gave you is the same code I had except it forced https://. His code is protocol-relative (//), which turned out to be what you needed for whatever special rules WPE enforces. The code on my site is now using // instead of https:// so no code change needed for you.

 

It's surprising to me that you're still having an issue. I just visited https://itarsenal.com/contact/ and it loaded the CSS as http://itarsenal.com/wp-content/uploads/pagelines/compiled-css-core-1403733468.css

However, I tried loading http://itarsenal.com/contact/ (non-HTTPS) and it didn't redirect to the https page. If you're still on WPE, I'd imagine this means WPE doesn't have their SSL settings correct. The way they run their SSL, you have to tell them the URL to be HTTPS and then all HTTP will redirect to the HTTPS version of that page.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

We were having the same issue on our site. Only certain pages on our site (mostly containing donation forms) are intended to display in https mode. While in https mode, DMS was serving up all the CSS stylesheets as regular http. The force ssl plugin worked and mostly took care of the problem.

 

However, we're still getting errors. It appears that the navbar section is serving up a javascript file as regular http, which is crippling our navbar on https pages by removing all the dropdowns when a browser blocks the script.

 

One of the pages in question: https://www.canceradvocacy.org/donate/donationform/

The error I receive from Firefox: "Blocked loading mixed active content 'http://www.canceradvocacy.org/wp-content/themes/dms/dms/sections/navbar/navbar.js?ver=5332eb'"

 

On a separate page (https://www.canceradvocacy.org/toolbox/wellpoint/order-form/), our Yoast Breadcrumbs plugin is still serving up a regular http style sheet, but I don't necessarily expect you guys to solve what is possibly a problem with a third party plugin. 

 

Any ideas?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Also, it appears that this plugin is causing multiple other issues on the site.

 

All font awesome icons are blocked in regular http mode (note the search icon on the navbar):

http://www.canceradvocacy.org/donate/

But the icons display in https mode:

https://www.canceradvocacy.org/donate/donationform/

 

Each browser is behaving differently. Firefox shows boxes with characters inside instead of the icons. Chrome shows blank boxes. IE displays nothing.

 

In regular http mode, while using Firefox, it appears something is malfunctioning in our twitter widget that is causing the page to never finish "loading". In Chrome and IE, this problem doesn't occur. (http://www.canceradvocacy.org)

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Okay, well the Navbar issue in https and the firefox issue in reg http mode magically resolved themselves, was probably some css cache thing or something.

 

But font awesome icons are still not appearing in regular http mode because of this Pagelines https plugin. They do appear in https mode. If i deactivate the plugin, the icons reappear in regular http mode.

 

http://www.canceradvocacy.org/ You will notice the missing search icon on the navbar.

 

Anyone?

 

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I did not see this thread when I started my thread on this very topic this morning. My issue is the css being loaded as https when the site is loaded as http. 

 

I have the latest protocol neutral filter in place. So not sure what else needs to change.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

duplicate

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I am getting these updates as the creator, stinks this isn't isokated to me, why can't DMS handle this,

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