dqeonr8554 2016-08-12 11:37
浏览 79
已采纳

使用jQuery 3.x运行时出现CKFinder错误

It appears that CKFinder 3.3 (for PHP) is not compatible with jQuery 3.0 or 3.1. Whenever I try to load CKFinder with either of those versions, I get these two errors and CKFinder does not load:

[Error] TypeError: undefined is not an object (evaluating 'a.event.props.concat')
    (anonymous function) (jquery.mobile.js:4:5781)
    (anonymous function) (jquery.mobile.js:4:6334)
    (anonymous function) (jquery.mobile.js:3:115)
    global code (jquery.mobile.js:3:130)
[Error] TypeError: undefined is not an object (evaluating 't.event.special.swipe.start')
init — ckfinder.js:3373
(anonymous function) — ckfinder.js:14863:116
execCb — ckfinder.js:715
check — ckfinder.js:510
enable — ckfinder.js:589
init — ckfinder.js:482:172
(anonymous function) — ckfinder.js:648:99

    check (ckfinder.js:5:21940)
    enable (ckfinder.js:5:24481)
    init (ckfinder.js:5:20742)
    (anonymous function) (ckfinder.js:5:26286)

If I revert to jQuery 1.12.3 (with no other changes), it works fine.

One of the errors occurs within jQuery mobile, so it could be a problem inside that, however, that is the latest version (1.4.5) and I've not found any reports about incompatibilities between jQuery mobile and jQuery 3. I also tried using th jQuery migrate plugin, but that did not help.

I can work around the problem by telling CKFinder to use jQuery 1.12 while the page it's embedded in uses 3.1, however, it's obviously not ideal to have to load two copies of jQuery.

  • 写回答

1条回答 默认 最新

  • doudao8283 2016-08-16 09:30
    关注

    Just a note here, as answered on the ticket https://github.com/ckfinder/ckfinder/issues/299#issuecomment-239440766

    Latest jQuery Mobile Framework 1.4.5 was released on 31 Oct 2014. It was before jQuery 2.2, which is not supported yet https://github.com/jquery/jquery-mobile/issues/8381. Also before any jQuery 3.x releases: 3.0 - released on June 9, 2016; 3.1 - released on July 7, 2016.

    As the docs stands:

    jQuery Mobile 1.4.x works with versions of jQuery core from 1.8.3 to 1.11.1 / 2.1.1.

    So, until jQuery Mobile isn't compatible with jQuery 3.x itself, CKFinder won't work with it neither.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题
  • ¥15 Python时间序列如何拟合疏系数模型