I am currently in the process of integrating the elFinder file manager into my project.
Here is a summary of what I have accomplished so far. I have included the following files:
$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 and main.css are arrays that are used to create <link rel='stylesheet'>
and
<script type='text/javascript'>
)
In my main page, I have included the following structure:
<div id='fileStructure'>
<div id="elfinder"> </div>
</div>
This section is utilized to initialize 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');
});
Currently, everything appears to be working fine. I can create directories, upload files, and perform other functions. However, when attempting to copy, an error is displayed:
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
The same error seems to occur with other actions such as cut and remove. Upon reviewing the script, it appears that the issue lies within this portion:
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))
I am having trouble understanding why this error is happening as the structure is unclear to me:
d = this
b = a(b)
where 'a' is a parameter of the main function of elFinder
(function (a) {
If anyone has encountered a similar issue or can provide assistance on resolving this problem, it would be greatly appreciated. UPDATE
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