Closed (fixed)
Project:
FileField Sources
Version:
7.x-1.4
Component:
Source: IMCE
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Feb 2012 at 23:10 UTC
Updated:
12 Aug 2012 at 20:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
dman commentedYes.
I did the same yesterday.
You need to not just register the files using file_save(), you ALSO need to tell the system that the file is "in use" otherwise the IMCE browser won't let you touch them (it actually finds them, then hides them from you in the filebrowser)
Based on a good (D6) start at fixing this issue at
http://www.freelock.com/blog/john-locke/2010-02/using-file-field-importe...
I discovered a lot of interestingness with the D7 file management routines, and came up with http://drupalcode.org/project/file_ownage.git/blob/refs/heads/7.x-1.x:/f...
- if you look at that and compare with what you've done, you'll probably see the extra step - in the mass of comments here;
(I'm trawling the issues right now looking for a nice solution to the second problem - "reference existing". I can fix it with a minor patch to filefield_sources itself, but am trying to find the rationale first.
Comment #2
chaloum commentedI have the same issue IMCE shows the files when accessing if from the WYSIWYG editor but from Drupal commerce It doesn't display the files
Comment #3
fietserwinI have the same problem, but only in the root directory (sites/default/files). Thus not related to files not being managed but an error in the source code.
file sources/imce.inc, function filefield_source_imce_custom_scan():
In the root directory, this will lead to select ... where ... LIKE 'public:///%'. So code should be something like:
Sorry for not posting as a patch, but this is very simple to fix.
Comment #4
tekante commentedAttaching patch based off of #3 which worked for me. It's the same as #3 describes with one adjustment to the not like condition to help make sure what is excluded is in a subdirectory ('_%/%' as a pattern instead of just '%/%'). Records were found in our system like public:///filename.txt for the URI when in the root directory and without the _% part of the pattern they were being excluded.
Comment #5
fietserwinThus: confirmed as being a bug and tested by multiple people => change category and status.
Comment #6
quicksketchThanks guys, looks great! Seems like this doesn't affect the D6 version, so committed to D7 only.
Comment #7.0
(not verified) commentedadded some more details