Closed (outdated)
Project:
elFinder file manager
Version:
7.x-2.x-dev
Component:
User interface
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Feb 2012 at 10:54 UTC
Updated:
23 Oct 2017 at 18:34 UTC
Jump to comment: Most recent
Comments
Comment #1
ph0enix commentedTry to check April 17+ build.
Comment #2
nicodh commentedFor me, using elfinder_ffsel module, when I upload 2 files within elfinder popup, then I select one of them, and this throws 4 errors :
So I can't select a file uploaded with elfinder, and when I select a file with elfinder, the "add more" button disappears.
I use elfinder 7.x-2.x-dev (2012-04-19) with elfinder-lib-2.x-20120418_230001.tar.gz.
Comment #3
bancarddata commentedI am having the exact same problem. I was able to reference a file that had already been uploaded outside of elFinder, but one that was uploaded via elFinder 2.0 spat out the filesize() errors as well as a "The file used in the Image field may not be referenced". A quick search of the web indicated possibly a need for a "file_usage_add" call? Not sure.
Comment #4
bancarddata commentedI have updated to the latest dev and the issue persists. If I first upload the file using the regular file field upload widget, it works fine. I can even select a file with elfinder that I already uploaded with the regular field field widget, and that works fine too. I checked all of my directory and file permissions and all is ok.
I ended up making a change to elfinder.module at line 1172 and it seemed to get rid of the "file used in the Image field may not be referenced" error, however the filesize warning still displays (although the file size seems to be added to the database just fine). Here is what I modified:
I change line 1172 from:
$file->status = FILE_STATUS_PERMANENT;to:
$file->status = 0;Is this ok? Still not sure what I can do to get rid of the filesize warning. Also, there is another issue with the elfinder window not closing and therefore a new file widget does not appear so I have to save the node before I can add another file (this is an unlimited field). But, that is for another issue...
Comment #5
chris-ju commentedI agree with @bancarddata and I confirm that line 1180 has no reason to be !
If you comment the line 1180, you will not have the error "The file used in the File field may not be referenced." anymore.
The file cannot have permanent status if you don't have made any reference to it before.
Please apply this fix to this great module ! Thanks.
Comment #6
ph0enix commentedhttp://api.drupal.org/api/drupal/includes!file.inc/group/file/7
If file is temporary it will removed by system automatically when it will expired.
Comment #7
chris-ju commented@ph0enix
Thanks for your response. Ok, I understand.
So I suggest to modify the elfinder.drupalfs.driver.inc file :
After line 250 :
@file_save($this->_drupalfileobject($path));Add the following code :
This line add a "default" reference in the file_usage table.
What do you think ?
Comment #8
ph0enix commentedLet's try to test it. Use Jun 26+ build
Comment #9
ph0enix commentedComment #9.0
ph0enix commentedThis happens when the images have been uploaded using "drag & drop".
Comment #10
bwaindwain commentedTo all you googlers looking for answers, I had a similar problem. See https://www.drupal.org/node/2879571
Comment #11
bwaindwain commented