Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hi there,
I would like to report a bug of this module.
I used this module with media 2.x, media gallery 2.x and plupload integration.
With this modules activated was impossible to upload video file with extention mp4, mov... ecc....
Multimedia upload is deprecated.
So we need to use file entities.
But this module have this file extention allowed
define('FILE_ENTITY_DEFAULT_ALLOWED_EXTENSIONS', 'jpg jpeg gif png txt doc docx xls xlsx pdf ppt pptx pps ppsx odt ods odp');
declared in the beginning of the file_entity.module.
So I changed this line like:
define('FILE_DEFAULT_ALLOWED_EXTENSIONS', 'jpg jpeg gif png txt doc docx xls xlsx pdf ppt pptx pps ppsx odt ods odp mp3 mov mp4 m4a m4v mpeg avi ogg oga ogv wmv ico');
and my problem was solved.
Hope it can help someone!
And sorry for my bad english!
Comment | File | Size | Author |
---|---|---|---|
#35 | file_entity_variables-1836266-35.patch | 944 bytes | Devin Carlson |
#33 | file_entity_variables-1836266-33.patch | 1.74 KB | czigor |
#28 | file_entity_variables-1836266-27.patch | 2.33 KB | iva2k |
#26 | file_entity_variables-1836266-26.patch | 2.33 KB | iva2k |
#12 | file_entity_variables-1836266-12.patch | 1.63 KB | iva2k |
Comments
Comment #1
ParisLiakos CreditAttribution: ParisLiakos commentedWe should make this configurable..maybe turn it to a variable?
Comment #2
mrfelton CreditAttribution: mrfelton commentedSimple patch to switch the setting over to a variable.
Comment #3
mrfelton CreditAttribution: mrfelton commentedOops, last patch blew away the array.
Comment #4
mrfelton CreditAttribution: mrfelton commentedOk, lets try again. Should have been a space separated string.
Comment #5
ghyupdc CreditAttribution: ghyupdc commentedOops, last patch blew away the array.
Comment #6
ParisLiakos CreditAttribution: ParisLiakos commentedthanks..it makes sense
Comment #7
ParisLiakos CreditAttribution: ParisLiakos commentedcommited
Comment #8
mrfelton CreditAttribution: mrfelton commentedAs a side note, media.module references FILE_DEFAULT_ALLOWED_EXTENSIONS and also needs to be updated to use the new variable.
Comment #9
ParisLiakos CreditAttribution: ParisLiakos commentedi know, feel free to open an issue there;)#1846674: convert FILE_ENTITY_DEFAULT_ALLOWED_EXTENSIONS to the new variable
Comment #11
iva2k CreditAttribution: iva2k commentedAdding a variable makes it one step closer to being configurable, however, without any UI to actually change the value of this variable the fix is incomplete.
Comment #12
iva2k CreditAttribution: iva2k commentedHere's a patch that adds variable_ui hooks for a "free UI".
Comment #13
ParisLiakos CreditAttribution: ParisLiakos commentednah, just remove it..there is a ui in variable module, we dont need to provide another one
Comment #14
iva2k CreditAttribution: iva2k commentedI agree that making UI for every silly variable is a waste of time. I think variable/variable_ui should be part of the core.
Do you want me to roll another patch to remove this comment? Or just omit it from commit?
Comment #15
ParisLiakos CreditAttribution: ParisLiakos commentedi will just ommit it;) but that said..cant remember if file_entity owns any other variable, so we register it...if we have more, lets put them in there since we are implementing the hook
Comment #16
ParisLiakos CreditAttribution: ParisLiakos commentedOk, lets register those too:
they are both integers
Comment #17
Dave ReidWhat is the plan when we start porting the module to Drupal 8 and inclusion in Drupal core? This hook would not be appropriate to remain since it's not included in core. Would this implementation move to variable module? This should add a @todo for a plan. Or better yet, likely it should form-alter the 'File system' settings page to add this variable, which would be a better fit for core.
Comment #18
ParisLiakos CreditAttribution: ParisLiakos commentedin d8 there is CMI, so i am not sure what happens to variable module..for core inclusion, this should be removed, like any other integration with non-core modules that are in file_entity
Comment #19
slashrsm CreditAttribution: slashrsm commentedAnother thing that should be considered here is the fact that Media provides very similar variable and even UI for it's configuration. That is VERY confusing, since one easily assumes that this variable effects file_entity also, modifies it and nothing happens. I believe that this could be VERY frustrating.
I'd consider this a major UX flaw...
Comment #20
shenzhuxi CreditAttribution: shenzhuxi commentedI think 'file_entity_default_allowed_extensions' should be set based on the file types declared by hook_file_default_types.
Comment #21
ParisLiakos CreditAttribution: ParisLiakos commentedor allow everything..
Comment #22
slashrsm CreditAttribution: slashrsm commentedAllowing all types is generally not a very good idea.
Comment #23
aaron CreditAttribution: aaron commentedI agree that allowing all types would not be good. Per #17 and the issues previous to that, I am setting this issue to "needs work". For #19, I think that that should be an issue for the Media module.
Comment #24
iva2k CreditAttribution: iva2k commented@aaron
"needs work" - can you clarify what needs to change in #12? Is it only #13 note or something else?
Comment #25
aaron CreditAttribution: aaron commentedI would add the variables noted in #16 and move it to the file settings form of core mentioned in #17. Yes, I would also take care of #13.
Comment #26
iva2k CreditAttribution: iva2k commentedI re-rolled patch #12 to include #13, #16. The only change to file_entity module is an addition of new file file_entity.variable.inc (and a pointer in .info file)
As to a request of a plan in #17, when time comes, file_entity.variable.inc file can be moved to variable/includes, next to other include files addressing core variables.
Personally I don't like CMI and think that variable module hits the nail on the head with 99% of module configuration needs. I'm considering to strip settings UI in all my modules and make variable module take care of all that. Declarative programming rocks!
Comment #28
iva2k CreditAttribution: iva2k commented.info file has changed since #12... Updated patch from #26.
Comment #29
slashrsm CreditAttribution: slashrsm commentedLooks nice. I would add an entry in README.txt to inform people that they can use variable.module to edit configuration that is not exposed in UI otherwise. Would also add this to online docs after this gets committed.
Comment #30
ParisLiakos CreditAttribution: ParisLiakos commentedi dont think we should add anything to the .info file btw
needs work for a README entry as well
Comment #31
mailfox CreditAttribution: mailfox commentedapply patch #28... see images
http://southtrip.ru/sites/default/files/wtf.png
Comment #32
iva2k CreditAttribution: iva2k commented@mailfox
Can you post a screenshot of the variables page for the settings?
Comment #33
czigor CreditAttribution: czigor commentedInfo file entry is useless, I have removed it. Otherwise the patch is practically the same as #28.
There's no README in this module.
Comment #34
aaron CreditAttribution: aaron commentedThis looks good to me.
Comment #35
Devin Carlson CreditAttribution: Devin Carlson commentedEven as a big proponent of the Variable module, requiring a user to figure out that they have to download and install a submodule (Variable Admin) of a primarily API module (Variable) that has a significantly smaller user base than Media just to configure a basic setting (what file types users can upload) seems like a bit much to me.
Attached is a simple patch to add the default allowed file extensions to the top of the File system page per Dave Reid's suggestion in #17.
I think that this is ready to go and will commit in the next few days unless anyone has any objects/concerns/improvements. :)
Comment #36
Devin Carlson CreditAttribution: Devin Carlson commentedCommitted #35 to 7.x-2.x.
Comment #37.0
(not verified) CreditAttribution: commentedI've changed the deprecated entity