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.
This is one way to solve problems with exporting file types, is to ensure that all the information for a file type is contained in our one table. I'm wondering why exactly we'd need three separate tables to store file types, when it might be complicating things.
Related:
#1845516: Custom file types exported through Features are missing mimetype information.
#1979832: Remove schemes from file types
Comment | File | Size | Author |
---|---|---|---|
#8 | merge-mimetype-information-into-file-type-1977708-5.patch | 5.51 KB | venugopp |
#4 | merge-mimetype-information-into-file-type-1977708-4.patch | 5.47 KB | Devin Carlson |
#4 | exportable_mimetypes.png | 63.6 KB | Devin Carlson |
Comments
Comment #1
Dave ReidThis would also fix that file_entity_uninstall() needs to use API functions to load the file types.
Comment #2
Dave ReidNote that #1979832: Remove schemes from file types would remove the file_type_streams table.
Comment #3
Dave ReidReducing scope now that #1979832: Remove schemes from file types is committed.
Comment #4
Devin Carlson CreditAttribution: Devin Carlson commentedA patch to store mimetypes in the {file_type} table as a serialized blob.
It includes an update function to migrate existing MIME types from {file_type_mimetypes} into {file_type}.
A screenshot showing that MIME type information is now exportable with Features!
Comment #5
Devin Carlson CreditAttribution: Devin Carlson commentedMarked #1845516: Custom file types exported through Features are missing mimetype information. as a duplicate.
Comment #6
Devin Carlson CreditAttribution: Devin Carlson commentedTested #4 with a number of existing sites and didn't run into any upgrade path problems (only default file types, additional custom file types, file types with default/additional/no MIME types).
Committed to 7.x-2.x.
Comment #8
venugopp CreditAttribution: venugopp commentedWith the above patch, it overwrites the default mimetypes.
It should migrate only the customised mimetypes.
Here is the patch for this.
Comment #9
aaron CreditAttribution: aaron commentedComment #10
Dave Reid@pradeepvenugopal: That patch doesn't look correct. Can you make sure it's rolled against the very latest 7.x-2.x branch in Git?
Comment #11
venugopp CreditAttribution: venugopp commentedThe fix is already available in the latest branch.
Comment #11.0
venugopp CreditAttribution: venugopp commentedAdding http://drupal.org/node/1979832 to related issues