WYSIWYG on Mac & Win - not working

7 posts by 2 authors in: Forums > CMS Builder
Last Post: August 29, 2008   (RSS)

By ScottL - August 24, 2008

The test page on the tinyMCE website works fine.

Here's what I have:

Mac OS 10.4.10
Browsers: Firefox 2 & 3, Safari, Opera
Also tried on a Windows/IE machine.
Javascript is fine.

The tinyMCE folder is set to 755 (also tried 777)
I also backed up the tinyMCE folder and uploaded a replacement

WYSIWYG still won't work (mac or win), so It must be something with my installation. Any suggestions?

Thanks

Re: [thinkng] WYSIWYG on Mac & Win - not working

By Dave - August 24, 2008

Hi thinkng, welcome to the CMS Builder forum. :)

Try this url on your installation and let me know what comes up (should be some javascript code):
cmsAdmin/tinymce3/tiny_mce_gzip.php

Let me know what that returns and we can figure out what's not working -or- if you like you can email me CMS and FTP login details and I can take a look at your server directly (email to dave@interactivetools.com, never post login details to forum).

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] WYSIWYG on Mac & Win - not working

By ScottL - August 24, 2008

Dave,
I sent you an email with the results of the url. Here they are as well...thanks.

var tinyMCE_GZ = {
settings : {
themes : '',
plugins : '',
languages : '',
disk_cache : true,
page_name : 'tiny_mce_gzip.php',
debug : false,
suffix : ''
},

init : function(s, cb, sc) {
var t = this, n, i, nl = document.getElementsByTagName('script');

for (n in s)
t.settings[n] = s[n];

s = t.settings;

for (i=0; i<nl.length; i++) {
n = nl;

if (n.src && n.src.indexOf('tiny_mce') != -1)
t.baseURL = n.src.substring(0, n.src.lastIndexOf('/'));
}

if (!t.coreLoaded)
t.loadScripts(1, s.themes, s.plugins, s.languages, cb, sc);
},

loadScripts : function(co, th, pl, la, cb, sc) {
var t = this, x, w = window, q, c = 0, ti, s = t.settings;

function get(s) {
x = 0;

try {
x = new ActiveXObject(s);
} catch (s) {
}

return x;
};

// Build query string
q = 'js=true&diskcache=' + (s.disk_cache ? 'true' : 'false') + '&core=' + (co ? 'true' : 'false') + '&suffix=' + escape(s.suffix) + '&themes=' + escape(th) + '&plugins=' + escape(pl) + '&languages=' + escape(la);

if (co)
t.coreLoaded = 1;

// Send request
x = w.XMLHttpRequest ? new XMLHttpRequest() : get('Msxml2.XMLHTTP') || get('Microsoft.XMLHTTP');
x.overrideMimeType && x.overrideMimeType('text/javascript');
x.open('GET', t.baseURL + '/' + s.page_name + '?' + q, !!cb);
// x.setRequestHeader('Content-Type', 'text/javascript');
x.send('');

// Handle asyncronous loading
if (cb) {
// Wait for response
ti = w.setInterval(function() {
if (x.readyState == 4 || c++ > 10000) {
w.clearInterval(ti);

if (c < 10000 && x.status == 200) {
t.loaded = 1;
t.eval(x.responseText);
tinymce.dom.Event.domLoaded = true;
cb.call(sc || t, x);
}

ti = x = null;
}
}, 10);
} else
t.eval(x.responseText);
},

start : function() {
var t = this, each = tinymce.each, s = t.settings, sl, ln = s.languages.split(',');

tinymce.suffix = s.suffix;

// Extend script loader
tinymce.create('tinymce.compressor.ScriptLoader:tinymce.dom.ScriptLoader', {
loadScripts : function(sc, cb, s) {
var ti = this, th = [], pl = [], la = [];

each(sc, function(o) {
var u = o.url;

if ((!ti.lookup || ti.lookup.state != 2) && u.indexOf(t.baseURL) === 0) {
// Collect theme
if (u.indexOf('editor_template') != -1) {
th.push(/\/themes\/([^\/]+)/.exec(u)[1]);
load(u, 1);
}

// Collect plugin
if (u.indexOf('editor_plugin') != -1) {
pl.push(/\/plugins\/([^\/]+)/.exec(u)[1]);
load(u, 1);
}

// Collect language
if (u.indexOf('/langs/') != -1) {
la.push(/\/langs\/([^.]+)/.exec(u)[1]);
load(u, 1);
}
}
});

if (th.length + pl.length + la.length > 0) {
if (sl.settings.strict_mode) {
// Async
t.loadScripts(0, th.join(','), pl.join(','), la.join(','), cb, s);
return;
} else
t.loadScripts(0, th.join(','), pl.join(','), la.join(','), cb, s);
}

return ti.parent(sc, cb, s);
}
});

sl = tinymce.ScriptLoader = new tinymce.compressor.ScriptLoader();

function load(u, sp) {
var o;

if (!sp)
u = t.baseURL + u;

o = {url : u, state : 2};
sl.queue.push(o);
sl.lookup[o.url] = o;
};

// Add core languages
each (ln, function(c) {
if (c)
load('/langs/' + c + '.js');
});

// Add themes with languages
each(s.themes.split(','), function(n) {
if (n) {
load('/themes/' + n + '/editor_template' + s.suffix + '.js');

each (ln, function(c) {
if (c)
load('/themes/' + n + '/langs/' + c + '.js');
});
}
});

// Add plugins with languages
each(s.plugins.split(','), function(n) {
if (n) {
load('/plugins/' + n + '/editor_plugin' + s.suffix + '.js');

each (ln, function(c) {
if (c)
load('/plugins/' + n + '/langs/' + c + '.js');
});
}
});
},

end : function() {
},

eval : function(co) {
var w = window;

// Evaluate script
if (!w.execScript) {
if (/Gecko/.test(navigator.userAgent))
eval(co, w); // Firefox 3.0
else
eval.call(w, co);
} else
w.execScript(co); // IE
}
};
tinyMCE_GZ.init({});

Re: [thinkng] WYSIWYG on Mac & Win - not working

By Dave - August 25, 2008

Ok, as long as that's outputting javascript code then it should be working. I'll have to take a look at the install. Can you email me CMS and FTP login details to dave@interactivetools.com (email, never post login details to forum).

I'll have a look and let you know what the issue was.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] WYSIWYG on Mac & Win - not working

By ScottL - August 27, 2008

Dave

Did you find anything with my install that is causing the problem?


Thanks

Re: [thinkng] WYSIWYG on Mac & Win - not working

By Dave - August 27, 2008

Thanks for the reminder. I was still waiting for your email - it got mislabeled as spam - I flagged it so they should get through now.

I can't actually view or edit any files through FTP. Not sure why. I think what's happening is the javascript is being gzip'd (compressed) twice. I've seen this _once_ before.

Try editing this file: /cmsAdmin/tinymce3/tiny_mce_gzip.php

Make a backup first, then replace this:

$compress = getParam("compress", "true") == "true";

With this:

$compress = false;

Let me know if that fixes it.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] WYSIWYG on Mac & Win - not working

By ScottL - August 29, 2008

Dave,


That worked perfect. Thanks.