电子查找器问题。尝试复制文件时未定义不是函数错误
elFinder issues. Undefined is not a function error when trying to copy file
我正在尝试实施 elFinder file manager。
这就是我所做的。
包含的文件:
$arr_css = array(
"main.css",
"jquery-ui.css",
"elfinder.min.css",
"theme.css"
);
$arr_js = array(
"jquery.js",
"main.js",
"jquery-ui.js",
"elfinder.min.js",
"elfinder.ru.js"
);
(main.js和main.css是用来创建<link rel='stylesheet'>
和<script type='text/javascript'>
的数组)
在我的主页上有一个
<div id='fileStructure'>
<div id="elfinder"> </div>
</div>
我用它来初始化 elfinder:
$(document).ready(function() {
var elf = $('#elfinder').elfinder({
lang: 'ru', // language (OPTIONAL)
url : '/radio/elfinder-2.0-rc1/php/connector.php' // connector URL (REQUIRED)
}).elfinder('instance');
});
这就是我现在拥有的。看起来不错,我可以创建目录、文件,可以上传它们。但是当我尝试复制它时,它说:
Uncaught TypeError: undefined is not a functionelfinder.min.js:2841 elFinder.commands.copy.execelfinder.min.js:1746 (anonymous function)elfinder.min.js:1706 (anonymous function)jquery.js:3058 jQuery.event.dispatchjquery.js:2676 jQuery.event.add.elemData.handle.eventHandle
同样的错误出现在其他操作上,如剪切删除等。
当我查看脚本时,我发现错误出现在带有
的字符串中
return a.each(this.files(b), function (a, b) {
if (!b.read || !b.phash) return !d.reject(["errCopy", b.name, "errPerm"])
}), d.isRejected() ? d : d.resolve(c.clipboard(this.hashes(b))
我真的不明白为什么会这样,因为结构对我来说不清楚:
d = this
b = a(b)
其中a是elfinder主函数的参数
(function (a) {
谁能帮我解决这个问题?可能有人遇到过类似的问题?
更新
Uncaught TypeError: undefined is not a functionelfinder.min.js:2860 elFinder.commands.cut.execelfinder.min.js:1746 (anonymous function)elfinder.min.js:1706 (anonymous function)jquery.js:3058 jQuery.event.dispatchjquery.js:2676 jQuery.event.add.elemData.handle.eventHandle
Uncaught TypeError: undefined is not a functionelfinder.min.js:4249 elFinder.commands.rm.execelfinder.min.js:1746 (anonymous function)elfinder.min.js:1706 (anonymous function)jquery.js:3058 jQuery.event.dispatchjquery.js:2676 jQuery.event.add.elemData.handle.eventHandle
根据您的 URL (/radio/elfinder-2.0-rc1/php/connector.php) 看来您使用的是 Elfinder 2.0 RC1。
您应该知道,Studio 42(开发 elFinder 的公司)自 2012 年以来没有更新或开发任何 elFinder 代码。用户 nao-pon 最近负责开发和错误修复。
因此,您应该下载 Nightly build 以使用最新更新的代码。这应该可以解决您的问题。
我正在尝试实施 elFinder file manager。
这就是我所做的。 包含的文件:
$arr_css = array(
"main.css",
"jquery-ui.css",
"elfinder.min.css",
"theme.css"
);
$arr_js = array(
"jquery.js",
"main.js",
"jquery-ui.js",
"elfinder.min.js",
"elfinder.ru.js"
);
(main.js和main.css是用来创建<link rel='stylesheet'>
和<script type='text/javascript'>
的数组)
在我的主页上有一个
<div id='fileStructure'>
<div id="elfinder"> </div>
</div>
我用它来初始化 elfinder:
$(document).ready(function() {
var elf = $('#elfinder').elfinder({
lang: 'ru', // language (OPTIONAL)
url : '/radio/elfinder-2.0-rc1/php/connector.php' // connector URL (REQUIRED)
}).elfinder('instance');
});
这就是我现在拥有的。看起来不错,我可以创建目录、文件,可以上传它们。但是当我尝试复制它时,它说:
Uncaught TypeError: undefined is not a functionelfinder.min.js:2841 elFinder.commands.copy.execelfinder.min.js:1746 (anonymous function)elfinder.min.js:1706 (anonymous function)jquery.js:3058 jQuery.event.dispatchjquery.js:2676 jQuery.event.add.elemData.handle.eventHandle
同样的错误出现在其他操作上,如剪切删除等。 当我查看脚本时,我发现错误出现在带有
的字符串中return a.each(this.files(b), function (a, b) {
if (!b.read || !b.phash) return !d.reject(["errCopy", b.name, "errPerm"])
}), d.isRejected() ? d : d.resolve(c.clipboard(this.hashes(b))
我真的不明白为什么会这样,因为结构对我来说不清楚:
d = this
b = a(b)
其中a是elfinder主函数的参数
(function (a) {
谁能帮我解决这个问题?可能有人遇到过类似的问题? 更新
Uncaught TypeError: undefined is not a functionelfinder.min.js:2860 elFinder.commands.cut.execelfinder.min.js:1746 (anonymous function)elfinder.min.js:1706 (anonymous function)jquery.js:3058 jQuery.event.dispatchjquery.js:2676 jQuery.event.add.elemData.handle.eventHandle
Uncaught TypeError: undefined is not a functionelfinder.min.js:4249 elFinder.commands.rm.execelfinder.min.js:1746 (anonymous function)elfinder.min.js:1706 (anonymous function)jquery.js:3058 jQuery.event.dispatchjquery.js:2676 jQuery.event.add.elemData.handle.eventHandle
根据您的 URL (/radio/elfinder-2.0-rc1/php/connector.php) 看来您使用的是 Elfinder 2.0 RC1。
您应该知道,Studio 42(开发 elFinder 的公司)自 2012 年以来没有更新或开发任何 elFinder 代码。用户 nao-pon 最近负责开发和错误修复。
因此,您应该下载 Nightly build 以使用最新更新的代码。这应该可以解决您的问题。