The version of CKEditor could not be detected.解决方法
本来网站用的ckeditor,但经过了解,直接用这个模块不能和wysiwyg同时使用,不然会报错。 然后就装了wysiwyg模块。按照指示配置好了ckeditor之后,发现任然是有个小红叉而且提示The version of CKEditor could not be detected.用Google搜了好久,终于找一个适合我当前版本的解决方案:
首先找到sites/all/modules/wysiwyg/editors/ckeditor.inc文件,然后在第81行修改
if (preg_match('@version:\'(?:CKEditor )?([\d\.]+)(?:.+revision:\'([\d]+))?@', $line, $version)) {
修改成
if (preg_match('@version:\"(?:CKEditor )?([\d\.]+)(?:.+revision:\"([\d]+))?@', $line, $version)) {
然后上传就可以解决问题了。
后来在使用的过程中,发现在文章页面控制台有报错:Uncaught TypeError: Object [object Object] has no method 'once'
然后就继续Google,折腾了一两个小时解决问题方法如下:
修改 $('.wysiwyg', context).once('wysiwyg', function () { 为 $('.wysiwyg:not(.processed)', context).addClass('processed').each(function() { 下面放上所搜到的patch的地址https://drupal.org/files/wysiwyg-1181562.patch
分类:
79px:http://79px.com