2013-03-07 34 views
5

我的問題是,當我加載我的網頁我立刻收到錯誤是在FF零:this.getDoc() is nullthis.getDoc()使用TinyMCE的

功能的Editor.jsgetBody()被調用和文件似乎是不可用

getBody : function() { 
    return this.bodyElement || this.getDoc().body; 
}, 

在這種情況下,getBody()已被壁虎代碼塊中的destroy()函數觸發。

destroy : function(s) { 
     var t = this; 

     // One time is enough 
     if (t.destroyed) 
      return; 

     // We must unbind on Gecko since it would otherwise produce the pesky "attempt to run compile-and-go script on a cleared scope" message 
     if (isGecko) { 
      Event.unbind(t.getDoc()); 
      Event.unbind(t.getWin()); 
      Event.unbind(t.getBody()); // here is the relevant getBody() call 
     } 

銷燬已被tinymce.js

o.func.call(o.scope, 1); 

我能做些什麼來避免這個問題的功能addUnload觸發?

回答

2

發生在我身上時,我升級的jQuery ..

解決它只是jQuery的升級到最新版本,並TinyMCE的最新版本..

我已經發現了這個問題其他的解決辦法,而搜索網..嘗試刪除filemanager,imagemanager表單插件列表。如果設置不當,可能會導致一些問題。

+0

+1謝謝你的回覆。我沒有使用filemanager和/或imagemanager(它們不在我的插件列表中)。關於jQuery和Tinymce。我可能能夠升級到latesttinymce版本,但由於jQuery與我們的CMS衝突,我不能更新jQuery – Thariama 2013-03-14 08:45:53

1

雖然這已經得到解答,但我遇到了同樣的問題,但解決方案與此處列出的不同。基本上,即使是最新最好的jQuery和TinyMCE,我發現如果tinymce.init()的選項中的'external_plugins'爲空,在卸載/移除tinymce元素時會發生此錯誤。

對於上下文,發生在使用tinymce並且僅在此期間關閉引導模式之後,它只發生在'external_plugins'爲空時,爲空,空對象或空字符串,它不喜歡它除非有定義。