Closed (fixed)
Project:
D7 Media
Version:
7.x-1.x-dev
Component:
File entity
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
1 Jan 2012 at 07:58 UTC
Updated:
6 Jun 2012 at 16:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
gollyg commentedHere is a patch that seems to work, but would need some testing. The biggest issue with it is the need to load the file entities for a second time to retrieve the bundle information. This happens already in a media_field_prepare_view, but this function does not get called prior to rendering the file field. I imagine there is another way of processing this file list in a more elegant way, as this patch means it is happening in at least two places.
Comment #2
gollyg commentedI have tested with standard file fields on Drupal 7.10. All seems to work as expected.
Comment #4
gollyg commentedRe-rolled against dev
Comment #5
dave reidRather than re-using this formatter for the file type, I wonder if we should rather backport the 'Rendered file' formatter from File entity into Media 1.x's file_entity submodule - which would give us an added benefit of automatically supporting an upgrade path from 1.x to 2.x without any changes.
Comment #6
gollyg commentedYes, would make sense to keep it consistent with future versions. Will try to get onto a patch for that.
Comment #7
dave reidComment #8
gollyg commentedRecreated the patch, using the suggested formatter. I have kept the formatter in the file.fields.inc and added an include statement to the main module, to keep it as close as possible to the 2.x branch.
Comment #9
dave reidUpping priority and assigning for review.
Comment #10
wroxbox commentedAfter applying the patch and clearing cache I get
Fatal error: Cannot redeclare file_entity_view_mode_labels() (previously declared in /sites/all/modules/file_entity/file_entity.module:364) in /sites/all/modules/file_entity/file_entity.module on line 719
It appears that file_entity_view_mode_labels() and file_entity_view_mode_label() functions are both declared twice in the same module.
Comment #11
wroxbox commentedAfter removing douple declarations the functionality seems to works as defined. Works for me.
Comment #12
dave reid@wroxbox: If you are using the 7.x-1.x branch of Media, you should not have a sites/all/modules/file_entity module at all. You should have a sites/all/modules/media/file_entity since it's provided by Media and not a separate download.
Comment #13
wroxbox commented@davereid: You are right. I installed file_entity first separately and then media.
I was trying to implement metadata to core file with file_entity without media.
Comment #14
dave reidAnyone please feel free to review.
Comment #15
discipolo commentedtested & reviewed the patch with the result:
the media formatter is now available
good work! pleasure joining the sprint.
Comment #16
chris_h commentedTested on a fresh install with media 1.x-dev and media_youtube 1.0-beta3. The patch successfully adds rendered file option file formatter option (see attached before/after), which correctly displays a video, preview etc depending on view mode.
Comment #17
cosmicdreams commentedreviewed the patch and it looks solid. The only issue I found may be a non-issue: the .info file doesn't have a newline at the end. If that is irrevelent then this is RTBC
Comment #18
Taxoman commentedRemoving tag, as 1.0 was released on March 23rd, regardless of this issue being tagged as a stable release blocker.
Comment #19
marvil07 commentedI have just closed #1266786: 'media' formatter settings do not show up on display fields page and video is hidden on node detail page as duplicate in favor of this
Comment #20
Chaulky commentedApplied and worked cleanly on 7.x-1.0 release
Comment #21
aaron commented#8: file_formatters-1390878-2.patch queued for re-testing.
Comment #22
aaron commentedadding a tag; it would be nice to get an rtbc on this issue
Comment #23
aaron commentedwe need to make sure we add an update function to clear the cache, so that we catch the new formatter.
Comment #24
Steven Brown commentedPatch #8 worked like a charm. Thank you all for the help on this. It was greatly needed.
Comment #25
aaron commentedgreat work everyone, it is committed now!
http://drupalcode.org/project/media.git/commit/7623c30 and http://drupalcode.org/project/media.git/commit/7c35747
Comment #27
rattusrattus commentedHi
I'm running the 7.x-1.1 version of the module but I am still unable to select the media format if I use a file field type and the Media file selector widget. I've enabled the module and set file display option under the file types menu, am I missing something?
Thanks ahead