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.
Description field was added in this dev version for each media item attached in the node Edit form. It's purpose is stated as the following: The description may be used as the label of the link to the file, that would be a useful feature. However, I haven't found a way how to pull out this Description (that could replace file name as a label according to its stated purpose) - either in the node View mode, or in a custom view of files (in Views module). It doesn't seem to be manageable via File types menu.
Comments
Comment #1
Devin Carlson CreditAttribution: Devin Carlson commentedYou'll need to be using the latest -dev of File Entity (see #1784762: File description lost when using Rendered file formatter and Generic file display) and render your file using the "Generic file" field formatter.
Comment #2
almc CreditAttribution: almc commentedYes, I'm using the current devs: Media 7.x-2.x-dev with File Entity 7.x-2.x-dev. I've now tried to select a sole Generic file formatter in all view modes for the file type - Document. Still Description is not shown in labels for media files (particularly - text files) in either the node view mode or custom Views view displaying files.
By link label I assume Description part of a link:
<a href="url">Description</a>
.Btw, Display settings section is empty in view mode configuration forms, if this could be related somehow.
Comment #3
almc CreditAttribution: almc commentedJust found another issue with Description: I've created a new content type and attached a file and image fields to it, with Media browser widget - similarly as I did for Article. However Description is not appearing now for the file and image fields for that new content type, and I haven't found any settings managing Description appearance for a file/image field with Media browser widget. This one I've figured out - there is 'Enable Description field' in the file field settings for a content type.However, 'Enable Description field' option doesn't seem to be present for image field with Media widget, I think it could be added for image field as well, as can be used in custom image formatters, for example.
Comment #4
almc CreditAttribution: almc commentedAlso, not seeing Alt and Title values being used anywhere, e.g. not seeing tool tips for images based on Title.
Comment #5
almc CreditAttribution: almc commentedAfter some further research I've figured out that Description is added as a part of the file field in a node (and in this capacity is faster than if implemented as a custom field added to file entity types). So basically formatters for each file type can deal with it. Would be nice if the option Include Description could be added in Manage File Display settings, similarly as for the nice setting Link image to for the image type.
By the way Link image to setting would also be useful if added for the document type.
Comment #6
almc CreditAttribution: almc commentedI wouldn't agree that it's fixed, as at least this option could be configurable for file type formatters supplied with File Entity module. Other file formatter providers could also follow and add this option in configuration for their formatters. Otherwise Description is practical only with code customization.
Agree though this issue can be changed to Support request category.
Comment #7
sportel CreditAttribution: sportel commentedI also haven't found a way to get the description field shown anywhere. Is it possible to get the description field in Views?
Thanks,
Mike.
Comment #8
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedClosing this issue as outdated. However, if you think this issue is still important, please let us know and we will gladly re-open it for review.
sincerely,
- the Drupal Media Team