Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I have tried a bunch of different version but the only formatter I get for my media field on my content type is 'media'. I should be getting like 'large', 'small' etc formatter options right? I have tried media_youtube and media_vimeo and even tho the video appears to have been added correctly it is hidden and I do not see any formatter options.
Comments
Comment #1
marvil07 CreditAttribution: marvil07 commentedFirst, let me mention that unlike 7.x-2.x, where there is a "Rendered file" formatter, on 7.x-1.x the only way to get file_entity render the files is to use the "Media" formatter, that is currently assigned only to 'media'("Multimedia asset") fields.
After taking a look to the code at 7.x-1.x I end up thinking that the real problem is that there are not default settings(or they are not being assigned), so
hook_field_formatter_settings_form()
is not returning anything when field_ui module asks for it.I'm marking this as major, since by default Media formatter do not have any file view setting, which make the output empty, which let us think something is pretty broken, but's it must me a little bug on default formatter settings.
My workaround for the problem: without saving set the display format for the field as hidden, then set it back to "Media" and magically the formatter options for Media field wil appear and you can choose the one you like.
Comment #2
akamaus CreditAttribution: akamaus commentedThanks a lot! I use media-7.x-1.0-rc2 and have been struggling with this for about a day. Your workaround works fine for me.
Comment #3
corentin CreditAttribution: corentin commentedsubscribing
Comment #4
benjifisherI agree that this is a major bug.
Thanks for the work-around. Just to clarify, we are talking about Home » Administration » Structure » Content types » <Your content type here> » Manage display or admin/structure/types/manage/your_content_type/display. The work-around applies for both Default and Teaser displays.
Comment #5
marvil07 CreditAttribution: marvil07 commentedduplicating this in favor of #1390878: File fields do not have the media formatter option