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.
I got this notice:
Notice: Use of undefined constant FILE_ENTITY_DEFAULT_ALLOWED_EXTENSIONS - assumed 'FILE_ENTITY_DEFAULT_ALLOWED_EXTENSIONS' i media_variable_default() (row 133 in /media/includes/media.variables.inc).
Comment | File | Size | Author |
---|---|---|---|
#8 | 1846674-media-file_entity_default_allowed_extensions-8.patch | 863 bytes | mrfelton |
#6 | 1846674-media-file_entity_default_allowed_extensions-6.patch | 780 bytes | jpstrikesback |
#4 | 1846674-media-file_entity_default_allowed_extensions.patch | 799 bytes | mrfelton |
Comments
Comment #1
ParisLiakos CreditAttribution: ParisLiakos commentedwhich file_entity version you have?
Comment #2
greenwork CreditAttribution: greenwork commentedI got this too with 7.x-2.0-unstable7+2-dev File Entity after install
Comment #3
ParisLiakos CreditAttribution: ParisLiakos commentedYeap, i just made a commit there that swaps the constant with a variable.
need to convert it in media module as well
something like this
http://drupalcode.org/project/file_entity.git/blobdiff/3779389cffdbb49a0...
Comment #4
mrfelton CreditAttribution: mrfelton commentedComment #5
ParisLiakos CreditAttribution: ParisLiakos commentedthanks a lot mrfelton
http://drupalcode.org/project/media.git/commit/9eeac2e
Comment #6
jpstrikesback CreditAttribution: jpstrikesback commentedThere was one place this is called in media.module, patch attached with a
variable_get('file_entity_default_allowed_extensions')
seems to sort it out.Comment #7
ParisLiakos CreditAttribution: ParisLiakos commentedNice catch jpstrikesback!
But maybe we should use media_variable_get for consistency
Comment #8
mrfelton CreditAttribution: mrfelton commented> maybe we should use media_variable_get for consistency
No that doesn't make sense here - we are trying to compare against the value provided by file_entity, not the value of one of media's variables. I think the above patch is correct, although the standard is to include the default value in the vall to variable_get. Patch updated.
Comment #9
jpstrikesback CreditAttribution: jpstrikesback commentedAnd good catch on the default value, wasn't sure if it was needed but it can only help.
Comment #10
ParisLiakos CreditAttribution: ParisLiakos commentedAh, i am sorry, i didnt notice the context
You are right thanks again
Comment #11
ParisLiakos CreditAttribution: ParisLiakos commentedhttp://drupalcode.org/project/media.git/commit/9d12eb6
Thanks both!