Rich-text Reply

Editor doesn't load pages properly

cp 11-23-15

Editor doesn't load pages properly

Hoping someone can help shed some light on this. I setup a new test in Optimizely, but can't get the page to load properly in the editor. I've tried both Chrome and Safari (see notes below).

 

Where possible external js and css files have been called in using src="// to help with http/https but still getting the issues.

 

Chrome

See screenshot below - I have also loaded the unsafe scripts but it still shows this screen. Have also checked the urls matched.

 

broken.png

 

Safari

Site seems to load but without any styling (just text) making it very hard to make any of the required changes. I get the following message also:

 

We have loaded your site using compatibility mode — you can still edit your page, but some site functionality might be missing

 

cp
Level 2

robertchan 11-23-15
 

Re: Editor doesn't load pages properly

The screenshot shows you've not placed the Optimizely snippet into the head of the page you're trying to test - if you've not done that yet, I'd first do that. Next, I'd recommend working within Chrome (Firefox was really slow for me, and I'm just personally more comfortable working through Chrome's Chrome console than Safari). 

 

In terms of external files, you'll need to reference those in the variation code area as such:

 

var loadScript = function(location, callback){
var fileRef = document.createElement('script');
fileRef.setAttribute('type','text/javascript');

if (callback) {
if (fileRef.readyState) { // IE
fileRef.onreadystatechange = function() {
if (fileRef.readyState == 'loaded' || fileRef.readyState == 'complete') {
fileRef.onreadystatechange = null;
callback();
}
};
} else { // Non-IE
fileRef.onload = function(){
callback();
};
}
}

fileRef.setAttribute('src', location);
document.head.appendChild(fileRef);
};

loadScript('URL OF WHATEVER EXTERNAL FILES YOU'RE REFERENCING', function() {
// CALLBACK - code that does something with the data returned by loading the script
});

Robert Chan

cp 11-23-15
 

Re: Editor doesn't load pages properly

Thanks Robert, we've already got the javascript in the head. Will try out the loadScript javascript and report back.

cp
Level 2
cp 11-24-15
 

Re: Editor doesn't load pages properly

We've tried removing ALL js except the Optimizely required file, but we're still getting compatibility mode.

The site currently loads under http (there is no secure certificate installed so requests will fail). CSS and image files are referenced with http://

I've got another site running under http and it loads fine in the editor so don't understand why this site is failing. Can anyone shed some light?
cp
Level 2