Closed (fixed)
Project:
D7 Media
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
2 Dec 2011 at 19:16 UTC
Updated:
26 Feb 2012 at 15:36 UTC
Jump to comment: Most recent file
When I edit my field settings for my media field type and change the allowed file extensions from the defaults, the values get saved to the database, but upon editing the form again, i don't see my changes. I think the #default_value property is getting set incorrectly? Attached a patch, but definitely needs a look from someone who knows what's supposed to be going on here.
Had to tweak the patch file slightly, so please take a look at the content if it fails to apply.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 1359588-media-field-instance-settings.patch | 2.11 KB | dave reid |
| #2 | 1359588-allowed_file_extensions_default_values-2.patch | 793 bytes | aaron.r.carlton |
| allowed_file_extensions_default_values-1.patch | 658 bytes | aaron.r.carlton |
Comments
Comment #1
jonathanmd commentedI hadn't tried to change out the allowed file extensions until you posted this. Interestingly enough I'm seeing the same issue on new and existing files that are of type Media Field, but I'm not seeing this when editing an image field.
Comment #2
aaron.r.carlton commentedAdded new patch which fixes an error introduced when adding the field for the first time.
Comment #3
dave reidActually the real problem here is that file_extensions is actually a field instance setting, and not a widget setting. Therefore this field should be output in a new media_field_instance_settings_form() rather than in media_field_widget_settings_form().
Comment #5
dave reidPatch needs to be tested against 7.x-1.x. Will provide patch for 7.x-2.x shortly.
Comment #6
dave reid#3: 1359588-media-field-instance-settings.patch queued for re-testing.
Comment #7
dave reidConfirmed this fixes the issue for both existing and new media field configurations - file extensions save properly. Committed to both 7.x-2.x and 7.x-1.x.
http://drupalcode.org/project/media.git/commit/c7af8ef
http://drupalcode.org/project/media.git/commit/065282e
Comment #9
brunodboI'm still seeing this in 7.x-1.0-rc3 when adding a media field ('Multimedia asset') to a content type. Things work fine when using a File field with a 'Media file selector' widget. Is the latter the preferred way of doing things?
Comment #10
dave reidI'm not able to duplicate that this still persists in the latest code for either 7.x-1.x or 7.x-2.x. I added a Multimedia asset field to a content type, and on the Edit step changed the allowed extensions and saved the field. I checked back and the allowed extensions field still had the desired value.
Comment #11
rfulcher commentedI am having a similar issue on a 7.12 site that I just setup. I have an image field and can't add any extensions to it. I am trying to add tif to the allowable extensions and it save to the database but upon editing the content it does not display or allow the tif image to be uploaded.
Thanks