2

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?

3
  • Relevant (though not duplicate) Wordpress Stack Exchange answer. Commented Jul 24, 2015 at 21:33
  • Try the steps suggested in this answer to another question: superuser.com/a/881431/471081 Commented 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 you Commented Jul 24, 2015 at 21:45

2 Answers 2

1

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';
            }
        }*/
Sign up to request clarification or add additional context in comments.

1 Comment

It's not really a Chrome bug...it's a poor example of PHP by WooCommerce.
0

plugin that fixes this issue is now available at https://wordpress.org/plugins/chrome-ssl-fix-for-wp/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.