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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dandaman created an issue. See original summary.

joseph.olstad’s picture

dandaman’s picture

Thanks for rolling the patch. Works for me.

  • joseph.olstad committed f9b1721 on 7.x-2.x authored by dandaman
    Issue #2893132 by joseph.olstad, dandaman: File description missing from...

  • joseph.olstad committed f9b1721 on 7.x-3.x authored by dandaman
    Issue #2893132 by joseph.olstad, dandaman: File description missing from...
joseph.olstad’s picture

Version: 7.x-2.3 » 7.x-2.4
Status: Needs review » Fixed

fixed in 7.x-3.x and 7.x-2.x branches.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.