sonata-project / SonataMediaBundle

Symfony SonataMediaBundle
https://docs.sonata-project.org/projects/SonataMediaBundle
MIT License
450 stars 496 forks source link

Placeholder image for files not working #2265

Closed lukepass closed 2 years ago

lukepass commented 2 years ago

Environment

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:    20.04
Codename:   focal

Sonata packages

show

``` $ composer show --latest 'sonata-project/*' sonata-project/admin-bundle 4.4.0 4.4.0 The missing Symfony Admin Generator sonata-project/block-bundle 4.8.0 4.8.0 Symfony SonataBlockBundle sonata-project/cache 2.2.0 2.2.0 Cache library sonata-project/doctrine-extensions 1.15.0 1.15.0 Doctrine2 behavioral extensions sonata-project/exporter 2.9.1 2.9.1 Lightweight Exporter library sonata-project/form-extensions 1.12.3 1.12.3 Symfony form extensions sonata-project/twig-extensions 1.9.0 1.9.0 Sonata twig extensions ```

Symfony packages

show

``` $ composer show --latest 'symfony/*' Color legend: - patch or minor release available - update recommended - major release available - update possible - up to date version symfony/amqp-messenger v5.4.0 v5.4.0 Symfony AMQP extension Messenger Bridge symfony/asset v5.4.0 v6.0.0 Manages URL generation and versioning of web... symfony/cache v5.4.0 v6.0.0 Provides an extended PSR-6, PSR-16 (and tags... symfony/cache-contracts v2.5.0 v3.0.0 Generic abstractions related to caching symfony/config v5.4.0 v6.0.0 Helps you find, load, combine, autofill and ... symfony/console v5.4.0 v6.0.0 Eases the creation of beautiful and testable... symfony/debug-bundle v5.4.0 v6.0.0 Provides a tight integration of the Symfony ... symfony/dependency-injection v5.4.0 v6.0.0 Allows you to standardize and centralize the... symfony/deprecation-contracts v3.0.0 v3.0.0 A generic function and convention to trigger... symfony/doctrine-bridge v5.4.0 v6.0.0 Provides integration for Doctrine with vario... symfony/doctrine-messenger v5.4.0 v6.0.0 Symfony Doctrine Messenger Bridge symfony/dotenv v5.4.0 v6.0.0 Registers environment variables from a .env ... symfony/error-handler v5.4.0 v6.0.0 Provides tools to manage errors and ease deb... symfony/event-dispatcher v5.4.0 v6.0.0 Provides tools that allow your application c... symfony/event-dispatcher-contracts v2.5.0 v3.0.0 Generic abstractions related to dispatching ... symfony/expression-language v5.4.0 v6.0.0 Provides an engine that can compile and eval... symfony/filesystem v5.4.0 v6.0.0 Provides basic utilities for the filesystem symfony/finder v5.4.0 v6.0.0 Finds files and directories via an intuitive... symfony/flex v2.0.1 v2.0.1 Composer plugin for Symfony symfony/form v5.4.0 v6.0.0 Allows to easily create, process and reuse H... symfony/framework-bundle v5.4.0 v6.0.0 Provides a tight integration between Symfony... symfony/http-client v5.4.0 v6.0.0 Provides powerful methods to fetch HTTP reso... symfony/http-client-contracts v2.5.0 v3.0.0 Generic abstractions related to HTTP clients symfony/http-foundation v5.4.0 v6.0.0 Defines an object-oriented layer for the HTT... symfony/http-kernel v5.4.0 v6.0.0 Provides a structured process for converting... symfony/intl v5.4.0 v6.0.0 Provides a PHP replacement layer for the C i... symfony/mailer v5.4.0 v6.0.0 Helps sending emails symfony/maker-bundle v1.36.4 v1.36.4 Symfony Maker helps you create empty command... symfony/messenger v5.4.0 v6.0.0 Helps applications send and receive messages... symfony/mime v5.4.0 v6.0.0 Allows manipulating MIME messages symfony/monolog-bridge v5.4.0 v6.0.0 Provides integration for Monolog with variou... symfony/monolog-bundle v3.7.1 v3.7.1 Symfony MonologBundle symfony/notifier v5.4.0 v6.0.0 Sends notifications via one or more channels... symfony/options-resolver v5.4.0 v6.0.0 Provides an improved replacement for the arr... symfony/password-hasher v5.4.0 v6.0.0 Provides password hashing utilities symfony/polyfill-intl-grapheme v1.23.1 v1.23.1 Symfony polyfill for intl's grapheme_* funct... symfony/polyfill-intl-icu v1.23.0 v1.23.0 Symfony polyfill for intl's ICU-related data... symfony/polyfill-intl-idn v1.23.0 v1.23.0 Symfony polyfill for intl's idn_to_ascii and... symfony/polyfill-intl-normalizer v1.23.0 v1.23.0 Symfony polyfill for intl's Normalizer class... symfony/polyfill-mbstring v1.23.1 v1.23.1 Symfony polyfill for the Mbstring extension symfony/polyfill-php73 v1.23.0 v1.23.0 Symfony polyfill backporting some PHP 7.3+ f... symfony/polyfill-php80 v1.23.1 v1.23.1 Symfony polyfill backporting some PHP 8.0+ f... symfony/polyfill-php81 v1.23.0 v1.23.0 Symfony polyfill backporting some PHP 8.1+ f... symfony/process v5.4.0 v6.0.0 Executes commands in sub-processes symfony/property-access v5.4.0 v6.0.0 Provides functions to read and write from/to... symfony/property-info v5.4.0 v6.0.0 Extracts information about PHP class' proper... symfony/proxy-manager-bridge v5.4.0 v6.0.0 Provides integration for ProxyManager with v... symfony/redis-messenger v5.4.0 v5.4.0 Symfony Redis extension Messenger Bridge symfony/routing v5.4.0 v6.0.0 Maps an HTTP request to a set of configurati... symfony/runtime v5.4.0 v6.0.0 Enables decoupling PHP applications from glo... symfony/security-acl v3.2.0 v3.2.0 Symfony Security Component - ACL (Access Con... symfony/security-bundle v5.4.0 v6.0.0 Provides a tight integration of the Security... symfony/security-core v5.4.0 v6.0.0 Symfony Security Component - Core Library symfony/security-csrf v5.4.0 v6.0.0 Symfony Security Component - CSRF Library symfony/security-guard v5.4.0 v5.4.0 Symfony Security Component - Guard symfony/security-http v5.4.0 v6.0.0 Symfony Security Component - HTTP Integration symfony/serializer v5.4.0 v6.0.0 Handles serializing and deserializing data s... symfony/service-contracts v2.4.1 v3.0.0 Generic abstractions related to writing serv... symfony/stopwatch v5.4.0 v6.0.0 Provides a way to profile code symfony/string v5.4.0 v6.0.0 Provides an object-oriented API to strings a... symfony/translation v5.4.0 v6.0.0 Provides tools to internationalize your appl... symfony/translation-contracts v2.5.0 v3.0.0 Generic abstractions related to translation symfony/twig-bridge v5.4.0 v6.0.0 Provides integration for Twig with various S... symfony/twig-bundle v5.4.0 v6.0.0 Provides a tight integration of Twig into th... symfony/validator v5.4.0 v6.0.0 Provides tools to validate values symfony/var-dumper v5.4.0 v6.0.0 Provides mechanisms for walking through any ... symfony/var-exporter v5.4.0 v6.0.0 Allows exporting any serializable PHP data s... symfony/web-link v5.4.0 v6.0.0 Manages links between resources symfony/web-profiler-bundle v5.4.0 v6.0.0 Provides a development tool that gives detai... symfony/webapp-meta v1.0.0 v1.0.0 A meta package for the web app pack symfony/webpack-encore-bundle v1.13.1 v1.13.1 Integration with your Symfony app & Webpack ... symfony/yaml v5.4.0 v6.0.0 Loads and dumps YAML files ```

PHP version

$ php -v
PHP 8.0.13 (cli) (built: Nov 22 2021 09:50:43) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.13, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.13, Copyright (c), by Zend Technologies

Subject

The placeholder image is not used when displaying a list of files:

image

Minimal repository with the bug

n/a

Steps to reproduce

Upload a file in a context with sonata.media.provider.file only.

Expected results

The following file should be used:

/bundles/sonatamedia/file.png

Actual results

Sonata Media is searching for another file.

jordisala1991 commented 2 years ago

What version of media-bundle are you using?

lukepass commented 2 years ago

Hello, I am using this version: "sonata-project/media-bundle": "4.0.0-RC2". Thanks!

jordisala1991 commented 2 years ago

Can you check with #2266 ?

lukepass commented 2 years ago

Yes, it's fixed now.

image