When using Rendered file formatter, the file description field no longer works correctly. The user should be able to enter a description and have that show up instead of the file name when displaying files as a Generic file link. However, it always shows the file name, even if the description has been set. The code for rendering the description is already in File Entity, but the description is not getting copied to the file object when the file is loaded. The attached patch fixes this.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Devin Carlson’s picture

Status: Active » Needs review
ParisLiakos’s picture

Issue tags: +Needs screenshots

i cant say i completely got the bug..two screenshots would help if you have the time.thanks:)

bneil’s picture

Status: Needs review » Postponed (maintainer needs more info)
elvis2’s picture

I an confirm the issue. You can validate it as well by doing the following:

- create content type (or use article)
- add file field. Be sure to check the checkbox that reads "enable the description field"
- change display for file to be rendered entity (content type manage display)
- goto file manage display (in my case admin/structure/file-types/manage/document/file-display)
- check the "generic file" option
- now create a node and add a file with a description

Attached are screenshots before the patch.

The only thing I would like to add is that the "download link" token should also have the [file:description] token available.

elvis2’s picture

Sorry, the images are not described. I thought I could come back and re-edit them. Here they are again...

elvis2’s picture

wow, apparently d.o. does not show file descriptions? Sorry...

Here is the content display with the patch applied.

bneil’s picture

Status: Postponed (maintainer needs more info) » Needs review
Issue tags: -Needs screenshots
aaron’s picture

Status: Needs review » Reviewed & tested by the community

Make sure to set the file field widget to file when testing. This works as advertised.

EgbertB’s picture

Yep, works fine. Why is this not yet in the new release?

SocialNicheGuru’s picture

I don't think the patch shows up. for some reason the patch is hidden and all one sees are the pictures.

I think correcting that might help.

Dave Reid’s picture

The patch is set to be displayed, so I'm not sure how I can set it to be visible...

https://drupal.org/files/file-entity-load-description.patch

Dave Reid’s picture

Issue summary: View changes
Dave Reid’s picture

aaron’s picture

file-entity-load-description.patch queued for re-testing.

aaron’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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