Stylesheet not being pulled in when using https

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Locked
BenedictPorter
Forum Members
Forum Members
Posts: 36
Joined: Fri Mar 06, 2009 5:33 pm

Stylesheet not being pulled in when using https

Post by BenedictPorter »

I have set up a CMSMS site that my end client now wishes to use https for. To that end they have now installed a secure certificate on the server.

When viewing the site using http, the site renders in the usual way. However, when using https the CSS stylesheet fails to load.

I have reviewed the rendered html and I can see that the stylesheet is being pulled in from "http://sitename...", even when using http in the link. If I change this using the browser inspector to "https://sitename.." the css is pulled in correctly and the pages render in the expected way.

I have reviewed the config.php file and everything appears to be set up correctly for this version of CMSMS. Additionally, I have tried setting pages to "Use HTTPS for this page:" in the options tab.

CMS version: 1.9.3 "Motu Tane"

The templates all use the {cms_stylesheet} tag to connect to the stylesheet in tmp/cache.

http site (renders correctly): http://windsorcreekapartments.com

https site (renders incorrectly): https://windsorcreekapartments.com

Any guidance greatly received.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Stylesheet not being pulled in when using https

Post by velden »

I'm sorry to inform you that version 1.9.3 isn't supported for a long time.

Modification have been made in the way https content is handled by CMSMS.

Seems the css is not your only problem by the way. Many (external) scripts are linked to http urls too.

Consider using protocol-relative urls for those.

You might want to try a dirty solution for your css to make it protocol-relative (untested):

{cms_stylesheet|regex_replace:'/https?:/':''}
Last edited by velden on Mon Dec 19, 2016 3:31 pm, edited 1 time in total.
Reason: changed regex
BenedictPorter
Forum Members
Forum Members
Posts: 36
Joined: Fri Mar 06, 2009 5:33 pm

Re: Stylesheet not being pulled in when using https

Post by BenedictPorter »

Thanks for your response.

I will look at upgrading the CMS first.
Locked

Return to “The Lounge”