I saw this had been fixed, but I am not sure if my problem is the same one as I got today's version of the filefield sources module. I am attaching screen shots. IMCE in my user profile tab is showing my image file, but not when I browse in my filefield (I got this image via remote URL, but I tried other ways of adding the image, too--same problem).

Thanks!

Comments

quicksketch’s picture

Currently you can only reference files that have been uploaded via FileField, even using IMCE. See #436182: IMCE lists unusable files (The selected file could not be used because the file does not exist in the database).

quicksketch’s picture

Title: Files not showing up in IMCE » Support all files that are tracked in the file_usage table in Drupal 7 with IMCE
Category: bug » feature

I'm updating the title to reflect the actual issue here and moving it to a feature request. The current functionality is by-design until we implement full support for Drupal 7's file_usage table.

hanpersand’s picture

I did upload the file in the screen capture using FileField--remote URL. I grabbed it from Flickr.
I did it a bunch of times and IMCE could not see my file.

quicksketch’s picture

Hm, this may be an issue with sub-directories. Could you try configuring your FileField to use a sub-directory rather than dumping in the files directory root? I think there may be an issue that the root directory is considered "public:///" instead of "public://" when we confirm the files in the file_managed table.

hanpersand’s picture

StatusFileSize
new26.88 KB

In my local setup (which is WAMP), my IMCE profile directories are configured as in screen shot. It sucks the file over from Flickr perfectly, but then--as described above--if I return later via the IMCE browser, it's not there.

I thought maybe there was Windows permissions weirdness in my subdirectories (though I haven't had a problem on Drupal 6 sites). I haven't had time to move this to my virtual LAMP box. So I was experimenting on my live site (LAMP stack), but now I've had to stop, because on both my dev and live sites I get the following Drupal error *unless I totally delete the Image field* from my content type:

Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of C:\wamp\www\[mysite]\includes\entity.inc).

That error persists even if I disable IMCE and Filefield sources. If you have advice as to what issue queue that weirdness should go in, let me know.

There's another Drupaler in my household on Linux. He's going to setup Filefield sources on his local tonight to see if he gets the same problem. I will report back. Thanks very much!

quicksketch’s picture

Title: Support all files that are tracked in the file_usage table in Drupal 7 with IMCE » Support all files that are tracked in the file_usage table in Drupal 7 with IMCE (a.k.a IMCE missing files)
hanpersand’s picture

Just to update... I got my array_flip issue to go away by disabling Filefield Sources, obliterating the field, creating a new image field, updating to Filefield Sources 1.4 and re-enabling it. Now, the remote URL is working beautifully, and so far array_flip has not returned.

But, this other issue persists--if I grab an image via remote URL and then return to it in IMCE, it's not there. This is an image that was obtained via Filefield Sources. My other Drupaler here has the same exact problem on his LAMP stack--I just watched him reproduce it. Right now, if either of us clicks on "File Browser" and "Browse", we cannot access *any* images that way, no matter how they were added.

gausarts’s picture

Currently having the similar issue.

IMCE via WYSIWYG + IMCE file browser at user page showing images, but not at IMCE via filefield_sources.

Subscribing. Thanks

WilliamV’s picture

Follow.

nitebreed’s picture

Subscribing

Anonymous’s picture

This is by design? I was hoping to use filefield_sources as an upgrade path to D7 but if I can't reference files this module is pretty useless.

My D6 sites use imceimage which I converted over to imagefield and I use this in conjunction with imce and filefield_sources. I guess all of that data is useless now if I upgrade to D7.

quicksketch’s picture

@Ryan Weal: The D7 version works exactly the same as the D6 version, which is to say you can only re-reference files that have been uploaded through a File/Image field previously.

Anonymous’s picture

@quicksketch Interesting. Was not aware of that with the D6 version. As mentioned, I have been migrating fields over from imceimage on D6 and my past attempts worked. This is the first time I migrated the fields and then updated to D7. I'll run some tests on the next site I upgrade, maybe I can make some recommendations to the imceimage_2_filefield module if that was the cause. Thanks.

Cebra’s picture

Version: 7.x-1.3 » 7.x-1.4

I got the same bug. I tried everything in the config, to fix it. :-(

ufku’s picture

There is a patch here, which introduces a Full Browser mode that list all files recorded in file_managed table. It also fixes a filepath issue in 7.x.

nateb’s picture

I totally respect that fieldfiled_sources limits things to files uploaded through File/Image fields. I've put the patch to use for Full Browser mode. I would like to know if there are any options that allow for inclusion of files not uploaded through File/Image or IMCE, or if there's a way to add directories to the file_managed table through a script or something, as was seen at http://features.centogram.com/node/8 for D6.

Neither IMCE nor File/Image fields allow for the easy upload of a batch of files and I'm frequently uploading 20 or more at a time. I use FTP because of the size and quantity of files. While I was able to manage getting those files to appear in D6 via filefield_sources, I can't in D7, and it makes me awfully sad.

That said, I've been looking at the Media module which allows for importing of directories. Unfortunately, it doesn't make it clear where the files go after import, and doesn't have clear management of subdirectories from there from what I've seen. But maybe there's something in the ideas of Media that can be applied to my specific issue.

Cholly’s picture

Not sure if I'm on the right track here? How about creating an Entity with relationship?

Have a look here: http://drupal.org/node/460320

and here (3 part series) if new to Entity:
http://www.istos.it/blog/drupal/drupal-entities-part-1-moving-beyond-nodes

Helmut Neubauer’s picture

Version: 7.x-1.4 » 6.x-1.4

Subscribe

kelutrab11’s picture

sub

dhalbert’s picture

Version: 6.x-1.4 » 7.x-1.4

restored issue version to 7; appears to have been flipped inadvertantly

jaypark’s picture

it's been over a year since this issue was originally posted and was wondering when filefield_sources will fully support file_usage table, as noted in http://drupal.org/node/1139474#comment-4397406

why not join forces with http://drupal.org/project/imce_filefield ? that module works with existing files, but doesn't offer, well, more sources...

eclauset’s picture

I think I'm seeing this same issue in Drupal 6 -- I uploaded a bunch of files via FTP and they are visible in the IMCE file browser when I access it from the file browser tab on my user page, but they are not visible when I access it from the file browser / browse link on a filefield field.

quicksketch’s picture

Status: Active » Fixed

We now allow all files in IMCE as part of #877452: Enable uploading and deletion through IMCE, after you enable the "Full" mode.

quicksketch’s picture

I uploaded a bunch of files via FTP and they are visible in the IMCE file browser when I access it from the file browser tab on my user page

This still isn't supported (and won't be) because the files must be tracked in the database for FileField Sources to use them. You can however use the "Attach" source to move FTP-uploaded files into the correct directory and make necessary database entries at the same time.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.