Tagged: SSL CSS
February 13, 2017 at 10:49 am #201048
I've done 4 SSL installs in the last 60 days. Three of the four went very smoothly and I was able to resolve mixed content, mainly in the form of image file and document URL's in a matter of 5 to 10 minutes. However the most recent SSL install has been a big issue with mixed content I am unable to resolve. All installs have used Genesis framework themes with the last one a theme developed by a 3rd party, who used to have his themes on Studio Press but no longer and I have posted in his forum but after almost 3 days no reply. Here's the backgroundhttp://leyla-najma.com
The cert is a Positive Comodo SSL and it's installed at leyla-najma.com. After first installing the SSL browsing to https://leyla-najma.com rendered a page with no CSS loaded at all. So I installed simple ssl and all worked great, except I was still not able to make the two url changes in WP settings to https. Each time I attempted to do this, when going to wp-login.php, or wp-admin I would get an error about not having permissions.
I switched from the Genesis theme to a WP default and all worked fine. Right now I'm kind of at the end of my rope because I need for the site to force https when anyone browses because I'm planning a google products campaign and they require this or they'll not approve the product data feed.
I did post over at WP.org and got one reply
"Your CSS files are not loaded because they are linked using http whereas the domain is connected via https." I knew this already but don't know how to fix it
My only other hope is the paid version of simple ssl, the developer will modify his theme so that it's compliant, change themes (don't want to do this), or that some sagacious, wise soul in this forum can provide guidance.
Thanks in Advance to anyone who can help.
DanFebruary 13, 2017 at 12:37 pm #201057
While it would be unusual for a developer to hard code http when loading a style sheet, i suppose it isn't impossible. Search through all of the theme's php files to see if there are any hard coded urls and change them. You should also chek the site's wp-config.php file to see if the site URLs are hard coded there. This would prevent you from changing them through the interface.
February 13, 2017 at 1:28 pm #201064
Thanks Victor -
Here's what I found in the functions.php file
$_SERVER['HTTPS'] = false;
I'm thinking I should change this to =true?February 13, 2017 at 1:39 pm #201066February 13, 2017 at 1:53 pm #201068
I changed to true and it looks all is good so far.February 13, 2017 at 1:57 pm #201070
Beyond my paygrade. You're saying that I can just remove the line of code all together? That makes sense to me. Why would the functions.php declare server configuration is a bit odd.February 13, 2017 at 3:31 pm #201083
That line of code is not declaring a server configuration. It is changing the PHP server variable it is receiving from the Apache HTTP process. I can see why a developer might change a received variable for testing purposes, but leaving it like that and not removing it from the code is just sloppy.
February 13, 2017 at 4:57 pm #201090
So no issue in removing itFebruary 13, 2017 at 5:44 pm #201092
I completely removed the line of code with no issues.
Site seems to be loading fine and where I"ve fixed mixed content caused by images, I get the padlock.
The one thing I am not sure how to fix is this.
When I browse to leyla-najma.com I don't get the padlock.
However, if I click on any internal link and then go back home, I get the padlock.
There is no mixed content on the homepage so there must be one other trick I need to do to force the padlock on the home page when someone comes in from a search etc. Any hints? I tried to mod the .htaccess but that didn't seem to do anything and both url's in wp settings are configured for https
Case will be closed if I can get this to be the default behavior.
DanFebruary 13, 2017 at 5:44 pm #201093
- The forum ‘General Discussion’ is closed to new topics and replies.