sonata-project / SonataCoreBundle

[deprecated] SonataCoreBundle
MIT License
318 stars 138 forks source link

Unable to load the "Sonata\CoreBundle\Twig\Extension\StatusRuntime" runtime. #672

Closed byhaskell closed 5 years ago

byhaskell commented 5 years ago

Environment

Sonata packages

sonata-project/admin-bundle              3.x-dev 81b6631 ~ dev-master bc51a64 The missing Symfony Admin Generator
sonata-project/block-bundle              3.14.0          = 3.14.0             Symfony SonataBlockBundle
sonata-project/cache                     2.0.1           = 2.0.1              Cache library
sonata-project/core-bundle               3.16.0          = 3.16.0             Symfony SonataCoreBundle
sonata-project/datagrid-bundle           2.4.0           = 2.4.0              Symfony SonataDatagridBundle
sonata-project/doctrine-extensions       1.1.5           = 1.1.5              Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 3.8.2           = 3.8.2              Symfony Sonata / Integrate Doctrine O...
sonata-project/easy-extends-bundle       2.5.0           = 2.5.0              Symfony SonataEasyExtendsBundle
sonata-project/exporter                  2.0.1           = 2.0.1              Lightweight Exporter library
sonata-project/media-bundle              3.x-dev 068fb3c ~ dev-master 548ee58 Symfony SonataMediaBundle
sonata-project/translation-bundle        2.4.0           = 2.4.0              SonataTranslationBundle

Symfony packages

symfony/asset                v4.2.3  = v4.2.3  Symfony Asset Component
symfony/cache                v4.2.3  = v4.2.3  Symfony Cache component with PSR-6, PSR-16, and tags
symfony/config               v4.2.3  = v4.2.3  Symfony Config Component
symfony/console              v4.2.3  = v4.2.3  Symfony Console Component
symfony/contracts            v1.0.2  = v1.0.2  A set of abstractions extracted out of the Symfony components
symfony/debug                v4.2.3  = v4.2.3  Symfony Debug Component
symfony/debug-bundle         v4.2.3  = v4.2.3  Symfony DebugBundle
symfony/dependency-injection v4.2.3  = v4.2.3  Symfony DependencyInjection Component
symfony/doctrine-bridge      v4.2.3  = v4.2.3  Symfony Doctrine Bridge
symfony/dotenv               v4.2.3  = v4.2.3  Registers environment variables from a .env file
symfony/event-dispatcher     v4.2.3  = v4.2.3  Symfony EventDispatcher Component
symfony/expression-language  v4.2.3  = v4.2.3  Symfony ExpressionLanguage Component
symfony/filesystem           v4.2.3  = v4.2.3  Symfony Filesystem Component
symfony/finder               v4.2.3  = v4.2.3  Symfony Finder Component
symfony/flex                 v1.1.8  = v1.1.8  Composer plugin for Symfony
symfony/form                 v4.2.3  = v4.2.3  Symfony Form Component
symfony/framework-bundle     v4.2.3  = v4.2.3  Symfony FrameworkBundle
symfony/http-foundation      v4.2.3  = v4.2.3  Symfony HttpFoundation Component
symfony/http-kernel          v4.2.3  = v4.2.3  Symfony HttpKernel Component
symfony/inflector            v4.2.3  = v4.2.3  Symfony Inflector Component
symfony/intl                 v4.2.3  = v4.2.3  A PHP replacement layer for the C intl extension that includes addit...
symfony/maker-bundle         v1.11.3 = v1.11.3 Symfony Maker helps you create empty commands, controllers, form cla...
symfony/options-resolver     v4.2.3  = v4.2.3  Symfony OptionsResolver Component
symfony/polyfill-intl-icu    v1.10.0 = v1.10.0 Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-mbstring    v1.10.0 = v1.10.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php72       v1.10.0 = v1.10.0 Symfony polyfill backporting some PHP 7.2+ features to lower PHP ver...
symfony/process              v4.2.3  = v4.2.3  Symfony Process Component
symfony/profiler-pack        v1.0.4  = v1.0.4  A pack for the Symfony web profiler
symfony/property-access      v4.2.3  = v4.2.3  Symfony PropertyAccess Component
symfony/routing              v4.2.3  = v4.2.3  Symfony Routing Component
symfony/security-acl         v3.0.1  = v3.0.1  Symfony Security Component - ACL (Access Control List)
symfony/security-bundle      v4.2.3  = v4.2.3  Symfony SecurityBundle
symfony/security-core        v4.2.3  = v4.2.3  Symfony Security Component - Core Library
symfony/security-csrf        v4.2.3  = v4.2.3  Symfony Security Component - CSRF Library
symfony/security-guard       v4.2.3  = v4.2.3  Symfony Security Component - Guard
symfony/security-http        v4.2.3  = v4.2.3  Symfony Security Component - HTTP Integration
symfony/stopwatch            v4.2.3  = v4.2.3  Symfony Stopwatch Component
symfony/swiftmailer-bundle   v3.2.5  = v3.2.5  Symfony SwiftmailerBundle
symfony/templating           v4.2.3  = v4.2.3  Symfony Templating Component
symfony/translation          v4.2.3  = v4.2.3  Symfony Translation Component
symfony/twig-bridge          v4.2.3  = v4.2.3  Symfony Twig Bridge
symfony/twig-bundle          v4.2.3  = v4.2.3  Symfony TwigBundle
symfony/validator            v4.2.3  = v4.2.3  Symfony Validator Component
symfony/var-dumper           v4.2.3  = v4.2.3  Symfony mechanism for exploring and dumping PHP variables
symfony/var-exporter         v4.2.3  = v4.2.3  A blend of var_export() + serialize() to turn any serializable data ...
symfony/web-profiler-bundle  v4.2.3  = v4.2.3  Symfony WebProfilerBundle
symfony/web-server-bundle    v4.2.3  = v4.2.3  Symfony WebServerBundle
symfony/yaml                 v4.2.3  = v4.2.3  Symfony Yaml Component

PHP version

PHP 7.2.0 (cli) (built: Nov 28 2017 23:48:49) ( ZTS MSVC15 (Visual C++ 2017) x64 )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies

Subject

Updated to 3-dev, then an error occurred while saving the entity "Unable to load the "Sonata\CoreBundle\Twig\Extension\StatusRuntime" runtime."

Twig_Error_Runtime:
Unable to load the "Sonata\CoreBundle\Twig\Extension\StatusRuntime" runtime.

  at src/Application/Sonata/AdminBundle/Resources/views/CRUD/edit.html.twig:12
  at Twig_Environment->getRuntime('Sonata\\CoreBundle\\Twig\\Extension\\StatusRuntime')

Steps to reproduce

Upgrade to sonata-project/admin-bundle (3.x-dev). Then try to save any entity.

Expected results

Successful entity preservation.

Actual results

Unable to load the "Sonata\CoreBundle\Twig\Extension\StatusRuntime" runtime.

Riches commented 5 years ago

I can also replicate the issue. Downgrading sonata-project/core-bundle (3.16.0 => 3.15.1) temporarily resolves the issue.

KevinM2k commented 5 years ago

I am also seeing this issue on brand new symfony 4 and sonata installation when saving entities using 3.16

matracine commented 5 years ago

Same problem for me after an upgarde. Downgrading sonata-project/core-bundle (3.16.0 => 3.15.1) resolves the issue. When validating an edit Form:

kunicmarko20 commented 5 years ago

https://github.com/sonata-project/SonataCoreBundle/pull/667 this is probably the issue, maybe revert it if no one can take a look and fix it, cc @greg0ire

greg0ire commented 5 years ago

I'm not sure but I think there should be a simple fix to this, please test #674, everyone.