I am into a very wired problem. I have http website built in Wordpress. The problem is when I check the view source of the site I see that it is adding https to all the css or js external files and due to that I am getting css and js missing files error. It is only happening in the chrome browser. so I thought first may be its cache or other cookies kind a issue so I cleared the cache and also asked my friends to check the site in their laptops using chrome. what I came to know is when they checked the page by opening the view source tab, some of seeing the http and some https. users who sees the https doesn't see site accurately. any one have any idea what causing this issue?
-
Relevant (though not duplicate) Wordpress Stack Exchange answer.Maximillian Laumeister– Maximillian Laumeister2015-07-24 21:33:03 +00:00Commented Jul 24, 2015 at 21:33
-
Try the steps suggested in this answer to another question: superuser.com/a/881431/471081Colin Marshall– Colin Marshall2015-07-24 21:45:28 +00:00Commented Jul 24, 2015 at 21:45
-
@MaximillianLaumeister Its not a duplicate. I finally resolve this error. its a chrome bug in the latest release. let me post my answer for youhellosheikh– hellosheikh2015-07-24 21:45:52 +00:00Commented Jul 24, 2015 at 21:45
Add a comment
|
2 Answers
Okay I finally resolved this error myself. It is a chrome bug actually but there is a little hack provided in this below link
https://ma.ttias.be/chrome-44-sending-https-header-by-mistake-breaking-web-applications-everywhere/
I commented this below code which I found in woocommerce.php file
wp-content\plugins\woocommerce\woocommerce.php
/*if ( ! isset( $_SERVER['HTTPS'] ) ) {
if ( ! empty( $_SERVER['HTTP_HTTPS'] ) ) {
$_SERVER['HTTPS'] = $_SERVER['HTTP_HTTPS'];
} elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' ) {
$_SERVER['HTTPS'] = '1';
}
}*/
1 Comment
rnevius
It's not really a Chrome bug...it's a poor example of PHP by WooCommerce.
plugin that fixes this issue is now available at https://wordpress.org/plugins/chrome-ssl-fix-for-wp/