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.

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

报告相同问题?

悬赏问题

  • ¥15 删除虚拟显示器驱动 删除所有 Xorg 配置文件 删除显示器缓存文件 重启系统 可是依旧无法退出虚拟显示器
  • ¥15 vscode程序一直报同样的错,如何解决?
  • ¥15 关于使用unity中遇到的问题
  • ¥15 开放世界如何写线性关卡的用例(类似原神)
  • ¥15 关于并联谐振电磁感应加热
  • ¥15 this signal is connected to multiple drivers怎么解决
  • ¥60 请查询全国几个煤炭大省近十年的煤炭铁路及公路的货物周转量
  • ¥15 请帮我看看我这道c语言题到底漏了哪种情况吧!
  • ¥60 关机时蓝屏并显示KMODE_EXCEPTION_NOT_HANDLED,怎么修?
  • ¥66 如何制作支付宝扫码跳转到发红包界面