Cornerstone won't open any page

Sorry to be asking so many questions these days - Cornerstone refuses to open any pages in domain www.tellasia.org. I tried all 8 things above but no change. My issue is not the server or database as Cornerstone works fine on my other X Theme installations. It’s just this one site where it’s messed up. Note I’m running Pro on this site. I would truly appreciate your assistance.

Error mssg: The preview was unresponsive after loading. This is most often related to a plugin conflict or aggressive page cacheing.
Origin URL: https://www.tellasia.org
Preview URL: https://www.tellasia.org/donate

Hello There,

Thanks for posting in! After a careful investigation, I found out that you have inserted a custom JS code in the Theme Options > Custom JS and it causes a JS error on the page which have affected the Cornerstone builder. You have inserted this code:

// DISABLE CREATIVE CALL TO ACTION
jQuery(function() {
  jQuery(".disable-ccta .x-creative-cta").attr("href", "#55");
});

// SOMETHING TO DO WITH THE PROMO ELEMENT
jQuery('.home .x-promo').each(function(){
	jQuery(this).find('img').wrapAll('<a href="' + jQuery(this).find('.promo-link').attr('href') + '" />')
});


// CLICK CONTENT BAND TO REDIRECT TO VERY FIRST CHILDS URL
jQuery(function($){
  $('.x-content-band.hyperlink, .x-section.hyperlink').css({cursor:'pointer'}).click(function(e){
    window.location = $('a:first-child', $(this)).attr('href');
  });
});

jQuery(".clickablerow").wrap("<a href='https://www.tellasia.org/rescue/blue-haven-village' target='_blank'>");

jQuery(".clickablerow2").wrap("<a href='https://www.tellasia.org/educate/primary-schools/st-johns-school' target='blank'>");

jQuery(".clickablerow-rescue").wrap("<a href='https://www.tellasia.org/rescue' target='_blank'>");

jQuery(".clickablerow-educate").wrap("<a href='https://www.tellasia.org/educate' target='_blank'>");

jQuery(".clickablerow-disciple").wrap("<a href='https://www.tellasia.org/disciple' target='_blank'>");

jQuery(".clickablerow-empower").wrap("<a href='https://www.tellasia.org/empower' target='_blank'>");

// ADD SCROLL-DOWN LINK
jQuery(function($){
  $('.smooth-scroll').click(function(e){
    e.preventDefault();
    var adminbar = 0;
    
    if ( $('#wpadminbar').length > 0 ){
      adminbar = $('#wpadminbar').height();
    }
    
    console.log(adminbar);
    console.log($('#' + $(this).attr('href').split("#").slice(-1)[0] ).offset().top - ($('.x-navbar').height() + adminbar));
    $('html,body').animate({
      scrollTop: $('#' + $(this).attr('href').split("#").slice(-1)[0] ).offset().top - ($('.x-navbar').height() + adminbar)
    },700 ,'swing');
  });
});


// NATIVE X MENU DROPDOWN ON HOVER
jQuery('.x-nav-wrap li').on('mouseenter mouseleave', function() {jQuery(this).find('.x-sub-toggle').first().trigger('click');});

//HOTJAR tracks visits
(function(h,o,t,j,a,r){ h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)}; h._hjSettings={hjid:542256,hjsv:5}; a=o.getElementsByTagName('head')[0]; r=o.createElement('script');r.async=1; r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv; a.appendChild(r); })(window,document,'//static.hotjar.com/c/hotjar-','.js?sv='); 

//Salesforce Web-To-Lead script for form
<script src="https://www.google.com/recaptcha/api.js"></script>
<script>
 function timestamp() { var response = document.getElementById("g-recaptcha-response"); if (response == null || response.value.trim() == "") {var elems = JSON.parse(document.getElementsByName("captcha_settings")[0].value);elems["ts"] = JSON.stringify(new Date().getTime());document.getElementsByName("captcha_settings")[0].value = JSON.stringify(elems); } } setInterval(timestamp, 500); 
</script>


Please keep in mind that when inserting a custom JS code in this section, you are not supposed to include the <script></script> because the output in the front end will be automatically wrapped with the <script></script>. And since you have inserted the tag, it has resulted to an issue.

Moreover, I am also suspecting that your custom JS code has a conflict with the builder. May I suggest that you temporarily remove the JS code so that we can test the builder further? I would also recommend that you do a test for plugin conflict. Kindly deactivate your plugins one by one and see if the issue exist or not.

Hope this helps. Please let us know how it goes.

The script has been there a long time, so I didn’t think of that as the cause.

  1. I removed the script that you pointed out needed deleted. I then cleared browser cache and also style cache, however Cornerstone still gave the same error.
  2. I reverted to X Child Theme from Pro but that made the whole site go down so I switched back.
  3. I removed the last two custom elements entirely from JS (hotjar and salesforce web to ead) saved, cleared cache, tried again with same problem.

Current code in Custom JS is:
’ // DISABLE CREATIVE CALL TO ACTION
jQuery(function() {
jQuery(".disable-ccta .x-creative-cta").attr(“href”, “#55”);
});

// SOMETHING TO DO WITH THE PROMO ELEMENT
jQuery(’.home .x-promo’).each(function(){
jQuery(this).find(‘img’).wrapAll(’’)
});

// CLICK CONTENT BAND TO REDIRECT TO VERY FIRST CHILDS URL
jQuery(function($){
$(’.x-content-band.hyperlink, .x-section.hyperlink’).css({cursor:‘pointer’}).click(function(e){
window.location = $(‘a:first-child’, $(this)).attr(‘href’);
});
});

jQuery(".clickablerow").wrap("");

jQuery(".clickablerow2").wrap("");

jQuery(".clickablerow-rescue").wrap("");

jQuery(".clickablerow-educate").wrap("");

jQuery(".clickablerow-disciple").wrap("");

jQuery(".clickablerow-empower").wrap("");

// ADD SCROLL-DOWN LINK
jQuery(function($){
$(’.smooth-scroll’).click(function(e){
e.preventDefault();
var adminbar = 0;

if ( $('#wpadminbar').length > 0 ){
  adminbar = $('#wpadminbar').height();
}

console.log(adminbar);
console.log($('#' + $(this).attr('href').split("#").slice(-1)[0] ).offset().top - ($('.x-navbar').height() + adminbar));
$('html,body').animate({
  scrollTop: $('#' + $(this).attr('href').split("#").slice(-1)[0] ).offset().top - ($('.x-navbar').height() + adminbar)
},700 ,'swing');

});
});

// NATIVE X MENU DROPDOWN ON HOVER
jQuery(’.x-nav-wrap li’).on(‘mouseenter mouseleave’, function() {jQuery(this).find(’.x-sub-toggle’).first().trigger(‘click’);});

//HOTJAR tracks visits
(function(h,o,t,j,a,r){ h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)}; h._hjSettings={hjid:542256,hjsv:5}; a=o.getElementsByTagName(‘head’)[0]; r=o.createElement(‘script’);r.async=1; r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv; a.appendChild®; })(window,document,’//static.hotjar.com/c/hotjar-’,’.js?sv=’);

//Salesforce Web-To-Lead script for form
function timestamp() { var response = document.getElementById(“g-recaptcha-response”); if (response == null || response.value.trim() == “”) {var elems = JSON.parse(document.getElementsByName(“captcha_settings”)[0].value);elems[“ts”] = JSON.stringify(new Date().getTime());document.getElementsByName(“captcha_settings”)[0].value = JSON.stringify(elems); } } setInterval(timestamp, 500);’

Hi there,

The cause of this issue is this error Uncaught SyntaxError: Unexpected end of input and it’s pointing to the builder page itself, it could be corrupted or malformed. Please try re-installing your theme, then please provide your FTP login credentials and we’ll check there.

Thanks!

To reinstall the theme - do I have to uninstall both Pro and Pro Child (SCARY!!!) and then reinstall Pro then ProChild? OR can I just reinstall new downloads of the theme OVER the existing? Will any of this cause loss of customizations from the site etc?
I provided login info above and will provide it again along with FTP

Hi There,

Theme Options / Customizer settings will be saved in the database, so that you can safely re-install your X/Pro theme.

First try downloading the latest Pro theme from your Themeco dashboard and update manually by following this guide (https://theme.co/apex/forum/t/setup-updating-your-themes-and-plugins/62).

Let us know how it goes.
Thanks!

I logged into my Themeforest downloads but there is no X Pro available anymore to downloa, only X regular theme.

Hi Leanna,

You can download PRO from Forum Dashboard.

https://theme.co/apex/dashboard

Thanks

I FTP’e the newly downloaded, unzipped Pro into Themes and renamed the previous one so we’re running on the new one now… but no difference still Cornerstone won’t open. I do not see how to reinstall the child theme, if that matters.

Hello there,

I can see Cornerstone working fine on my end. Can you give us screenshots/videos/step-by-step procedure on where you’re seeing this issue?

Thank you.

  1. I cleared cache on both Chrome and Edge also cleared Style Cache
  2. Went to Pages
    3a) Clicked Edit on Home page and also Donate page
    4a) Clicked “Edit with Pro” - got the attached screenshot
    3b) from Pages directly clicked “Edit with Pro” - same thing
    3c) Opened incognito Chrome window, logged in, accessed Pages, Home page, “Edit with Pro” - same error

Hello there,

This might be a plugin conflict issue. You can try our troubleshooting steps here:

Hope this helps.

I’VE ALREADY gone through all the steps to troubleshoot everything! Also I just now disabled all plugins but the problem persists. I’d really appreciate if you would log into my site and see what’s wrong.

Hey @Leanna,

I see several possible complications in your site.

####1. You’re using 2 security plugins. This might cause conflicts. Please uninstall your security plugins and reset your htaccess file by renaming it to .htaccess-bak. Then in WP Admin Menu, go to Settings > Permalinks and just click the Save Changes button.

####2. You have used W3 Total Cache which is currently deactivated. Please try completely uninstalling it. Here’s a guide.

####3. You have lots of sites within your WordPress install (see Secure Note). Though this might not be connected to the error, this could be a potential problem.

What I’d recommend though is that you move your site to a different host and with clean WordPress install. This way, we’ll know if the issue is coming from Pro.

Thanks.

JUST NOW: I discovered when I add a new page, Cornerstone works perfectly! So something is going on with the existing pages. I MUST be able to get in an edit them… so plz help figure out what it is.

EARLIER: I followed the directions in the link about removing W3 Total Cache and whole site went down!! Host resolved as follows:
We found this error in the logs: [21-Mar-2018 17:58:23 UTC] PHP Fatal error: Unknown: Failed opening required ‘/home/tellas5/public_html/wordfence-waf.php’ (include_path=’.:/opt/cpanel/ea-php56/root/usr/share/pear’) in Unknown on line 0. We were able to fix this by renaming/disabling the .user.ini file

ALSO found weird WP install inside the tellasia.org install and Host deleted all associated files. Still Cornsterone wont work.

So now W3 Cache is gone and after observing that switchig to old X Theme Child the Cornerstone issue was not resolved, I’m back on X Pro Child, and Cornerstone still does not work.

EARLIER NOTES:
Moving to an entirely new server is definitely NOT something i can afford to dot! This is a costly time consuming operation!!!
Pro is not the problem: I switched back to old X Theme Child and Cornerstone still won’t open
I deleted Wordfence (the only plugin added since Cornerstone was working) and removed its code from .htaccess, still no luck. Plz note I’ve had W3Cache and the others active for a long time with no problem. Nevertheless they are also now deleted.

EARLIER, I did the below:

  1. I already renamed the entire Plugin folder so it could not be found, and then reset htaccess file by renaming it to .htaccess-bak. Then in WP Admin Menu, I went to Settings > Permalinks and clicked the Save Changes button. STILL NO CHANGE ie Cornerstone still didn’t work.

Could you please explain what you mean by this:
3. You have lots of sites within your WordPress install (see Secure Note). Though this might not be connected to the error, this could be a potential problem.

I have a number of other domains (bluehavenschool, leannacinquanta.com etc) each with their own wp install on their own domain name. So not sure what “sites” exist inside the tellasia.org wp install - please explain.

Hello There,

Thank you for the very detailed information. One thing I noticed when I go back to your original issues is that you cannot edit the Donate page. I have inspected it and there is an error on the page which says:

Refused to display 'https://app.mobilecause.com/form/7WgQag' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

It seems that you have inserted an iframe on the page and your server refuses to display it. It could be that this iframe is also preventing Cornerstone from working. This is the only remaining error I could find. If we can resolve this issue, you may be able to edit the page again in With Cornerstone.

In case you’d like to resolve this issue first, you can check out this link: https://stackoverflow.com/a/35790513

Please let us know how it goes.

I truly appreciate your attempts and continued assistance. If it were an error on a particular page then the other pages would open, but Cornerstone doesn’t open other pages that don’t have iframes either.

Regarding the iframe error, a previous tech attempted to address this by adding the following code at the top of .htaccess:

requires mod_headers

Header set Access-Control-Allow-Origin “*”

if that is not correct, plz advise. Also talked to the Host and they say the iframe is working fine on their end and on my website.

Hi there,

Even if you do fix it, it looks like the iframe src isn’t going to be loaded or will load slowly. The URL protects robots from embedding the iframe, I tried accessing it and I had to do two security verification. I recommend using different iframe source.

Thanks!

Are you referring to the iframe loading into Cornerstone? No, we don’t need the iframe to load into Cornerstone, it has never loaded there, and that is not important. The Cornerstone issue has nothing to do with the previous Iframe concern (that issue had nothing to do with Cornerstone but only with whether the iframe is accessible to visitors to the FRONT END of specifically www.tellasia.org/donate page). The current issue is: X THEME PAGES THEMSELVES are refusing to load into Cornerstone - this includes pages which don’t even have any iframe in them. I MUST be able to edit the website! So please help identify why NO PAGE that was previously made (only new pages created now) will open in Cornerstone…
thank you!!!

Hi there,

Related or not, it could still cause issues if the builder is unable to load it. And the slower the loading, the more chance the popup message will appear. Still, the issue is caused by this error Uncaught SyntaxError: Unexpected end of input, which indicate that the page HTML isn’t completely valid.

Could you try cloning your site in staging? I’d like to completely remove customization and plugins while testing and I don’t want to do that on your live site. It’s the only way we can narrow it down.

Thanks!