2011-06-03 97 views
5

我使用微小的mce(版本3.2.6)很長時間(沒有任何問題),但想升級到更新的版本(3.4.2) 。升級的原因是第三方插件(spellchecker)存在一些問題 - 在嘗試更新的版本後,這些問題已得到解決,開發人員env也遇到了問題。一切正常。 問題發生在現場環境(在提供新版本的應用程序到客戶端後),在客戶端,您可以通過兩種方式連接到應用程序(使用微小的mce):微小的mce在升級後停止工作(修改後的url)

(1)type address(so normal way,客戶端應用程序,該修改網址的一些原因,我不知道 - - 用這種方式微小MCE停止工作後升級到(3.4.2)

(2)使用某種門戶的一切工作正常)。 (我已經仔細檢查過,這隻與微小的mce版本更新有關,而不是與插件或其他問題有關)。

客戶端門戶轉換的URL看起來像這樣的方式: 未轉換的網址:

http://server.address/blabla/js/jsFileName.js?v=123

轉換的URL(從小提琴手搶下):

https://client.portal.com/http://server.address/blabla/js/jsFileName.js?v=123&psScriptReferrer=http://server.address/blabla/

正如我告訴之前,'舊'版本(3.2.6)工作正常(即使是那些神奇轉換的URL),在更新微小的mce之後出現問題(沒有更改配置或其他任何內容) 。我得到的錯誤是:

q is not a constructor 
https://client.portal.com/http://server.address/blabla/js/tiny_mce/tiny_mce.js?v=123&psScriptReferrer=http://server.address/blabla/ 
Line 1 

(function(d){var a=/^\s*|\s*$/g,e,c="B...{a.selection.onSetContent.add(f)})}}); 

我得到的所有的瀏覽器這個eror(查了一下:IE6/IE8/FF3.6)。這也會導致很小的mce不加載(只顯示「純html」文本輸入)。

我的假設是新版本包含了一些正則表達式,並且神奇轉換的鏈接包含多個'http'字符串。

我已經嘗試了一些改變以下參數(它們設置爲0) - 沒有運氣: convert_urls:1, relative_urls:1, remove_script_host:1

,也多了一個 'promissing'參數: document_base_url的:tinymce.documentBaseURL

但由於這個程序應該使用上述兩種方式的工作(1)和(2),我不能硬編碼的鏈接出現(也這聽起來像一個非常脆弱的解決方案)。

我不能100%肯定地說這是一個tinymce中的錯誤,因爲使用'正常'地址一切正常。另一方面,我無法對這些網址轉換做任何事情。

<script type="text/javascript"> 
    tinyMCE.init({ 
     mode : "exact", 
     elements : "content, contentFr", 
     theme : "advanced", 
     plugins : "spellchecker", 
     spellchecker_languages : "+English=en_CA,French=fr", 
     spellchecker_rpc_url : "jmyspell-spellchecker", 

     // Theme options 
     theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,fontselect,fontsizeselect,|,forecolor,backcolor,sub,sup", 
     theme_advanced_buttons2 : "link,unlink,|,bullist,numlist,|,justifyleft,justifycenter,justifyright,justifyfull,|,code,|,spellchecker", 
     theme_advanced_buttons3 : "", 
     theme_advanced_buttons4 : "", 

     theme_advanced_toolbar_location : "top", 
     theme_advanced_toolbar_align : "left", 
     theme_advanced_statusbar_location : "bottom", 
     theme_advanced_resizing : true, 
     theme_advanced_resize_horizontal : 0, 
     theme_advanced_path: false, 
     content_css : "css/tinyMCE_custom.css", 
     oninit: function(){ 
      tinyMCE.get('content').setContent('some text here'); 
      tinyMCE.get('contentFr').setContent('some different text here'); 
     } 
    }); 
    </script> 

感謝您的任何幫助/提示。

問候,

彼得

+2

我已經做了一些類似TinyMCE摔跤。首先,用普通版本替換縮小版本的TinyMCE,這樣至少你的錯誤信息會有意義。仔細檢查瀏覽器是否將腳本解釋爲JavaScript文件,您應該檢查HTTP Content-Type標頭,您的代理可能會將其搞亂。 – Halcyon 2011-06-11 22:33:24

回答

1

我會嘗試升級到當前版本TinyMCE的,這是3.4.3.

在更新日誌。該文件的txt文件存在,在許多其他錯誤修復中,有

「修復了在解析相對URI並且沒有提供base_uri設置時在tinymce.util.URI中拋出異常的問題。」

我不確定它會解決你的問題,但它應該更容易與最新版本,因爲不同的問題,然後不太可能互相干擾。

+1

嘗試3.4.3版本 - 沒有運氣(同樣的錯誤)。 – Peter 2011-06-13 07:23:43