Cornerstone plugin is causing my site to crawl

I need help. my website is causing my site (and all other sites on my server) to crawl. I tried disabling all my plugins and enable them 1 after another, and i narrowed it down to Cornerstone. But i can’t disable cornerstone else my site will not display it’s content. Please help. Thanks

site url: https://thehope.co

Hello @jirehly,

Thanks for writing in! It seems that there is a JS error in your page.
Uncaught TypeError: Cannot set property 'checked' of null at window.onload ((index):1788)

I can see that you have inserted this:

function CheckLang() {
  var isChecked = document.getElementById("langswitch").checked;
   
  if(isChecked){
    var str = window.location.href;
    var n = str.endsWith(".com/");
    if(n === true){
  		 window.location.replace(window.location.href + "_en");
       } else {
       var LangEN = "https://" + window.location.host + window.location.pathname;
       var newLangEN = LangEN.substr(0, LangEN.length-1); 
         window.location.replace(newLangEN + "_en");
    	 }
     } else {
     var LangCN = window.location.pathname;
		 var newLangCN = LangCN.substr(0, LangCN.length-4);
     window.location.replace("https://" + window.location.host + newLangCN);
     }
}

window.onload = function() {
    if(window.location.href.indexOf("_en/") > -1) {
       document.getElementById("langswitch").checked = true;
    }
}

You may need to contact the creator of the script to correct it first.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.