elfinder version: 2.1.40
protocol version: 2.1040
jquery version: 1.8.3 / ui: 1.10.2
Within my environment an bug is occurring if an file is selected. This happends while adding an link to an ckeditor field ( the link window) and also while adding an image to an ckeditor field ( the image properties window).
After clicking the "browse server" button to open the elfinder window and doubleclicking a file icon (or using the menu item Select item) the error stated below is rendered:
Chrome:
Error in `getFileCallback`.
$ is not a function
Firefox / Edge:
Error in `getFileCallback`.
Object expected
The selected file / link is correctly added to the corresponding url / link field within the parent window. Looks like the elfinder window raises the error while it tries to automaticly close itself after the correct value is set within the earlier mentioned parent field.
Any advice/idea what could be wrong?
Comments
Comment #2
ph0enix commentedWhat CKEditor integration you are using? Is it ckeditor or wysiwyg module? Try to check if elfinder.jquery.min.js included in the page source. Does the installing and enabling jquery_update help?
Comment #3
ph0enix commentedComment #4
ph0enix commentedComment #5
ph0enix commentedComment #6
nattyweb commentedI have this problem too today.
Elfinder: Version: 7.x-2.x-dev
Elfinder library: 2.1.40
CKeditor: Version: 7.x-1.18
CKEditor library: 4.5.4
Drupal: 7.59
The error appears when selecting an image to insert, although clicking Close continues and inserts the image.
I don't understand why this was closed as there appears to be no resolution. Please advise!
Thanks
Martin
Comment #7
nattyweb commentedProblem solved: I didn't have the very latest elFinder module installed. Updated to 7.x-2.x-dev (2018-Aug-06) and the problem went away.
Thanks for looking!
Martin
Comment #8
nravens commentedI have this error Error in `getFileCallback`. $ is not a function as well when using the 7.x-2.x-dev updated 31 Jul 2018 version. The image is added regardless of the error.
When I update the module to the latest dev version as mentioned in #7 above then my images appear to be locked/blocked and I can't click on any of them.
I'm using these versions:
Elfinder: Version: 7.x-2.x-dev - 31 Jul 2018 release
Elfinder library: 2.1.42
CKeditor: Version: 7.x-1.18
CKEditor library: 4.10.0
Drupal: 7.59
Previously used -
ElFinder: 7.x-0.8
ElFinder Library: 1.2
CKEditor: Version: 7.x-1.18
CKEditor Library: 4.6.2
Drupal: 7.59
I've Uninstalled and deleted the previous version of ElFinder module before installing the new version
Comment #9
hobbes_vt commentedI get the same issue but even with the newest nightly build (2018-Aug-06).
But I'm not using the CKEditor module, but run CKEditor through the Wysiwyg module.
Elfinder: Version: 7.x-2.x-dev (latest nightly build 2018-Aug-06)
Elfinder library: 2.1.40
Wysiwyg: Version: 7.x-2.5
CKEditor library: 4.6.2.20af917
Drupal: 7.59
Comment #10
hobbes_vt commentedJust noticed that it was working on another site where I had (almost) the same configuration.
Turns out this could be an issue of your jQuery library.
Once I set the "Default jQuery Version" to 1.8 (from 1.7, which I had before) the error went away.
I do recall that there was a reason for one of the other modules I use on this site, that forced me to go back to 1.7 - so now I need to track back if this issue still exists.
But at least for those of you who encounter the error - check your jQuery Update version, this may be a quick fix.
Comment #11
nravens commentedI'm using jQuery version 1.10 and still have the issue.
I have the same or very similar setup on another site with no errors.
The difference is that the one that gives the error was updated from the elFinder version that was reported to cause problems and advised to update immediately. I uninstalled the old version, deleted the files and installed the current version/s and still have the error but it uploads the files regardless
Comment #12
Bram Tassyns commentedI was also facing a similar issue but I have worked around it by replacing $ with jQuery in elfinder/editors/ckeditor/ckeditor.callback.js
(no idea why the $ function is not bound at the moment this callback is called, but at least it suppresses the error and everything works as expected).
Hopefully this will help other people facing the same problem.
Comment #13
trong.nguyen.tcec commented@Bram Tassyns: You are right!
Development version: 7.x-2.x-dev updated 3 Dec 2018 at 13:28 UTC
elFinder - file manager for web Version 2.1.40 (2018-07-14)
CKEditor module "7.x-1.18"
CKEditor library : CKEditor 4.11.2
Drupal core: 7.63
See file: elfinder\editors\ckeditor\ckeditor.callback.js
Comment #14
Jan DC commentedI had the same problem.
After some research I found out that the problem was in the code above the suggested fix of Bram.
In my case, "element" was null, so element.getValue() returned the error.
This was the original code:
I changed the code to this and now it works for me:
Comment #15
scottAtRoot802 commentedThanks @trong.nguyen.tcec. The fix in #13 worked for me.
Comment #16
ph0enix commentedMoved to #47