File module's FilemimeFormatter icon display renders empty image

Created on 7 September 2017, about 7 years ago
Updated 25 October 2023, about 1 year ago

Problem/Motivation

The file module's FilemimeFormatter has a option to render the File Mime type as a image.
If selected, it renders as an empty image - no src value etc.

Proposed resolution

The file link formatter correctly generates an icon class, converting various mime types to simple mime types. The classy base them then through css renders an icon. This works well.

My resolution is to add an extra preprocess function in file.module and templates in stable & classy themes.

Attaching a patch for 8.3.x (as that's the version in current usage in the project where bug is discover - so using composer link). Not sure whether this will be able to go into 8.4.x as it is a bug fix or if it should go in 8.5.x as it does change some existing stuff.

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
File module 

Last updated about 12 hours ago

Created by

🇨🇦Canada nickdickinsonwilde Victoria, BC (T'So-uke lands)

Live updates comments and jobs are added and updated live.
  • Needs frontend framework manager review

    Used to alert the fron-tend framework manager core committer(s) that a front-end focused issue significantly impacts (or has the potential to impact) multiple subsystems or represents a significant change or addition in architecture or public APIs, and their signoff is needed (see the governance policy for more information). If an issue significantly impacts only one subsystem, use Needs subsystem maintainer review instead, and make sure the issue component is set to the correct subsystem.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024