Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As I'm having a hard time using Filefield Paths together with Filedepot (see #1572170: Incompatibility with File (Field) Paths) I'm wondering if its somehow possible to disable Filefield Path on a per-field (or content type) basis? Filedepot works nicely when FFP is disabled and puts its file inside its directory structure, but all other file fields should be processed by FFP.
If I could somehow disable FFP processing for the field "filedepot_folder_file" everything should work fine.
Regards,
Daniel
Comments
Comment #1
piyuesh23 CreditAttribution: piyuesh23 commented@Daniel,
I had the same problem. I have added an admin page to select all the fields for which we don't wan't ffp settings to be applied. Attaching the patch here.
Comment #2
piyuesh23 CreditAttribution: piyuesh23 commentedSorry about the above patch missed the admin settings file. Adding the working patch here.
Comment #3
piyuesh23 CreditAttribution: piyuesh23 commentedCleaned up the above code a bit and here is the final patch. Tested with couple of fields and it works like a charm..:)
Comment #4
piyuesh23 CreditAttribution: piyuesh23 commentedAdded permissions for the administration of the filefield form.
Comment #5
Deciphered CreditAttribution: Deciphered commentedIt would make more sense to me to have the setting on the Field settings page, a simple checkbox where the File (Field) Path settings are currently, that when toggled on will hide the existing File path settings and replace it with the File (Field) Path settings using the FAPI #states attribute.
This approach means it can be done on a field-by-field basis without the need for additional pages.
I would also say that it should be an on by default as off by default could confuse new users of the module and potentially break things for existing users.
Cheers,
Deciphered.
Comment #6
Deciphered CreditAttribution: Deciphered commentedChanging this to a feature request.
Comment #7
Deciphered CreditAttribution: Deciphered commentedAn improved solution to this has been committed to 7.x-1.x.
Cheers,
Deciphered.