Reputation: 79
I'm using a WordPress plugin called Showbiz Slider and after editing a slide I cannot save it. After clicking the save button I see that there is javascript error Uncaught ReferenceError: tinyMCE is not defined
I've deactivated all other plugins and re-installed the wordPress files but neither of these fixed problem either.
I'm not sure where to go from here, so I'm hoping for some guidance. Is there somewhere that I can define tinyMCE to properly call it on the admin side of WordPress? Can I properly call it into the wp-admin header through a functions file?
Here is the bit of code from the browser inspector that shows where the error is.
var UniteSettingsBiz = new function(){
var arrControls = {};
var colorPicker;
var t=this;
this.getSettingsObject = function(formID){
var obj = new Object();
var form = document.getElementById(formID);
var name,value,type,flagUpdate;
//enabling all form items connected to mx
var len = form.elements.length;
for(var i=0; i<len; i++){
var element = form.elements[i];
name = element.name;
value = element.value;
type = element.type;
if(jQuery(element).hasClass("wp-editor-area"))
type = "editor";
flagUpdate = true;
switch(type){
case "checkbox":
value = form.elements[i].checked;
break;
case "radio":
if(form.elements[i].checked == false)
flagUpdate = false;
break;
case "editor":
var editor = tinyMCE.get("slide_text");
if(editor)
value = tinyMCE.get(name).getContent();
break;
case "select-multiple":
value = jQuery(element).val();
if(value)
value = value.toString();
break;
}
if(flagUpdate == true && name != undefined) obj[name] = value;
}
return(obj);
}
Upvotes: 0
Views: 4591
Reputation: 5752
There are many situations from that this tinyMCE is not defined
error occurs.
I have solution of one of the many cases. Hope this will help.
In my case problem was same on form saving it's giving error and on new post and new page Editor was not loading properly.
I had .htaccess
in my wp-admin, wp-includes and public_html folder which was generated by one of security plugin.
By removing this and flushing permalinks I checked again and error was gone.
Upvotes: 2