This is related to the issue reported in #2885829: File description missing from Generic File display.
On one site, we have the "Download Link" display and have, in the thee, modified it to show the "Description" if provided.
To get it working, I added the following patch to the lines of file_entity.field.inc that apply to the download_link display.
--- a/sites/all/modules/contrib/file_entity/file_entity.field.inc
+++ b/sites/all/modules/contrib/file_entity/file_entity.field.inc
@@ -344,6 +344,12 @@ function file_entity_field_formatter_view($entity_type, $entity, $field, $instan
$items = array_filter($items);
foreach ($items as $delta => $item) {
if (!empty($item['fid']) && ($file = file_load($item['fid'])) && file_entity_access('download', $file)) {
+ if (isset($item['display'])) {
+ $file->display = $item['display'];
+ }
+ if (isset($item['description'])) {
+ $file->description = $item['description'];
+ }
$element[$delta] = array(
'#theme' => 'file_entity_download_link',
'#file' => $file,
This is probably a small edge case because the default display and templates don't use the description, but at least until last month's release you could use those fields in template files or preprocess functions. So our site might not be the only site broken.
Comments
Comment #2
joseph.olstadComment #3
dandaman CreditAttribution: dandaman commentedThanks for rolling the patch. Works for me.
Comment #6
joseph.olstadfixed in 7.x-3.x and 7.x-2.x branches.