Here is the scenario. I'm using File(Field) Paths 7.x-1.0-beta4 to set a distinct file location for an attachments field on one of my content types. Using the File(Field) Sources module (7.x-1.9) I allow users to either upload a new file or browse using IMCE to reuse a file they've already uploaded. I have the setting for this set to Restricted: Users can only browse the field directory. No file operations are allowed. because I don't want them inadvertently browsing files associated with other nodes - only those uploaded for this specific node in this specific file location.
Uploads for the field are working properly and being placed where they should go. IMCE profiles are set up and working properly. Using the IMCE file browser linked from my user profile I can go into each individual node's attachments folder and see the files associated with each. However, with the IMCE FILE BROWSER SETTINGS set to Restricted if I put a node in edit mode and try to browse with IMCE to find an attachment I've already uploaded IMCE only displays the root file folder and doesn't allow me to really browse anything.
Perhaps this is just a misunderstanding of how the module is supposed to work. Perhaps this module doesn't integrate with File(Field) Paths. Either way any guidance anyone can provide would be immensely helpful. I'm going to attempt to dig into the code today to track down the source of the problem but I'm not great at contributed module development yet so I can make no promises. :)
Comments
Comment #1
jaydarnellThe following issue is at least related: https://www.drupal.org/node/1819234
Apologies if it is a duplicate. The issue reported in the link above seems to be a separate problem with potentially the same root cause.
Comment #2
Leeteq commentedIs this still an issue? #1819234: "File (Field) Paths" and "FileField Sources" has been fixed meanwhile, new release available.
Comment #3
jenlamptonI'm having an issue similar to this one, but I'm not using filefield paths, so I think that is unrelated.
I think the problem is that the directory you enter into the field settings for "File directory" is supposed to be a subdirectory of your Drupal "files" directory, but IMCE assumes that is a subdirectory of something IMCE calls
<root>instead.The instance setting
file_directoryappears nowhere in the imce.inc source file.Comment #4
RAWDESK commentedI am experiencing the opposite behaviour.
Setted restrictions are not applied whilst file browsing and acting on files.
See https://www.drupal.org/node/547140#comment-12308328
@jenlampton, I already tried /sites/default/files/my-manageable-dir and /sites/default/files as my browsable dir but didn't work either.