Problem/Motivation

Default Admin theme's file-link.html.twig is missing support for cases where the file_size variable is an empty string, due to the with_size variable being FALSE.

Steps to reproduce

If with_size is FALSE, file_size will be empty string, and file-link.html.twig prints empty parentheses as the size. This can be reproduced with the "Table of files" field formatter for a file field.

Proposed resolution

Check that the file_size variable is not empty before printing it.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3624341

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mfb created an issue. See original summary.

mfb’s picture

Issue summary: View changes
mfb’s picture

Title: Default Admin theme's file_link template does not support with_size = FALSE » Default Admin theme's file_link template does not support empty file_size

mfb’s picture

Issue summary: View changes
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

This is the same that claro had to should be safe.