SonataMediaBundle: The "Sonata\MediaBundle\Twig\Extension\MediaExtension" extension is not enabled.
Environment
Symfony 2.8 LTS on PHP 7.1
Sonata packages
sonata-project/admin-bundle 3.15.1 The missing Symfony Admin Generator
sonata-project/block-bundle 3.3.2 Symfony SonataBlockBundle
sonata-project/cache 1.0.7 Cache library
sonata-project/cache-bundle 2.3.1 This bundle provides caching services
sonata-project/classification-bundle 3.3.0 Symfony SonataClassificationBundle
sonata-project/core-bundle 3.3.0 Symfony SonataCoreBundle
sonata-project/datagrid-bundle 2.2.1 Symfony SonataDatagridBundle
sonata-project/doctrine-extensions 1.0.2 Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 3.1.4 Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/easy-extends-bundle 2.1.10 Symfony SonataEasyExtendsBundle
sonata-project/exporter 1.7.1 Lightweight Exporter library
sonata-project/formatter-bundle 3.2.1 Symfony SonataFormatterBundle
sonata-project/google-authenticator 1.0.2 Library to integrate Google Authenticator into a PHP project
sonata-project/intl-bundle 2.3.0 Symfony SonataIntlBundle
sonata-project/media-bundle 3.5.0 Symfony SonataMediaBundle
sonata-project/notification-bundle 3.1.0 Symfony SonataNotificationBundle
sonata-project/page-bundle 3.4.0 This bundle provides a Site and Page management through container and block services
sonata-project/seo-bundle 2.1.0 Symfony SonataSeoBundle
sonata-project/user-bundle 3.2.3 Symfony SonataUserBundle
Symfony packages
symfony/assetic-bundle v2.8.1 Integrates Assetic into Symfony2
symfony/monolog-bundle v2.12.1 Symfony MonologBundle
symfony/polyfill-apcu v1.3.0 Symfony polyfill backporting apcu_* functions to lower PHP versions
symfony/polyfill-intl-icu v1.3.0 Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-mbstring v1.3.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php54 v1.3.0 Symfony polyfill backporting some PHP 5.4+ features to lower PHP versions
symfony/polyfill-php55 v1.3.0 Symfony polyfill backporting some PHP 5.5+ features to lower PHP versions
symfony/polyfill-php56 v1.3.0 Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
symfony/polyfill-php70 v1.3.0 Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions
symfony/polyfill-util v1.3.0 Symfony utilities for portability of PHP codes
symfony/security-acl v3.0.0 Symfony Security Component - ACL (Access Control List)
symfony/swiftmailer-bundle v2.5.4 Symfony SwiftmailerBundle
symfony/symfony v2.8.18 The Symfony PHP framework
symfony/var-dumper v3.2.6 Symfony mechanism for exploring and dumping PHP variables
twig/extensions v1.4.1 Common additional features for Twig that do not directly belong in core
twig/twig v1.33.0 Twig, the flexible, fast, and secure template language for PHP
PHP version
PHP 7.1.0-5+deb.sury.org~xenial+1 (cli) ( NTS )
Steps to reproduce
Uploaded an image to S3. Now when clicking the image in the Media Gallery in the Admin Panel, throws 500
Expected results
Display Image from S3
Actual results
[2017-03-29 10:21:33] request.CRITICAL: Uncaught PHP Exception Twig_Error_Runtime: “The “Sonata\MediaBundle\Twig\Extension\MediaExtension” extension is not enabled.” at /var/www/app/vendor/sonata-project/media-bundle/Resources/views/MediaAdmin/edit.html.twig line 64 {“exception”:“[object] (Twig_Error_Runtime(code: 0): The "Sonata\MediaBundle\Twig\Extension\MediaExtension" extension is not enabled. at /var/www/app/vendor/sonata-project/media-bundle/Resources/views/MediaAdmin/edit.html.twig:64)”} []
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (15 by maintainers)
AH!.. I see it now… get_class
maybe that should be get_called_class?