Closed ebrost closed 7 years ago
I'v found the problem. It seems there is a conflict with the default layout config wich only allow text blocks in the header.
comment the lines in sonata_page.yml
templates:
default:
path: 'AppBundle::demo_layout.html.twig'
name: 'default'
containers:
header:
name: Header
# blocks:
# - sonata.block.service.text
content_top:
name: Top content
content:
name: Main content
content_bottom:
name: Bottom content
footer:
name: Footer
Environment
Windows 7 with wamp64
Sonata packages
sonata-project/admin-bundle 3.10.0 The missing Symfony Admin Generator sonata-project/block-bundle 3.2.0 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.1.0 Symfony SonataClassificationBundle sonata-project/comment-bundle 3.0.0 Integrate the FOSCommentBundle in the Sonata Project sonata-project/core-bundle 3.1.1 Symfony SonataCoreBundle sonata-project/datagrid-bundle 2.2 Symfony SonataDatagridBundle sonata-project/doctrine-extensions 1.0.2 Doctrine2 behavioral extensions sonata-project/doctrine-orm-admin-bundle 3.1.2 Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle sonata-project/easy-extends-bundle 2.1.10 Symfony SonataEasyExtendsBundle sonata-project/exporter 1.7.0 Lightweight Exporter library sonata-project/formatter-bundle 3.1.0 Symfony SonataFormatterBundle sonata-project/google-authenticator 1.0.2 Library to integrate Google Authenticator into a PHP project sonata-project/intl-bundle 2.2.4 Symfony SonataIntlBundle sonata-project/media-bundle 3.3.0 Symfony SonataMediaBundle sonata-project/news-bundle dev-master cc5db75 Symfony SonataNewsBundle sonata-project/notification-bundle 3.0.0 Symfony SonataNotificationBundle sonata-project/page-bundle 3.x-dev 7ecf74b This bundle provides a Site and Page management through container and block services sonata-project/seo-bundle 2.0.2 Symfony SonataSeoBundle sonata-project/sonata-composer dev-master 6ebe1f3 sonata-project/timeline-bundle 3.1.0 Integrates SpyTimelineBundle into Sonata sonata-project/user-bundle 3.0.1 Symfony SonataUserBundle
Symfony packages
symfony/assetic-bundle v2.8.1 Integrates Assetic into Symfony2 symfony/cache v3.2.0 Symfony implementation of PSR-6 symfony/monolog-bundle 2.12.0 Symfony MonologBundle symfony/phpunit-bridge 2.7.x-dev d848834 Symfony PHPUnit Bridge 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.4.0 Symfony SwiftmailerBundle symfony/symfony v2.8.14 The Symfony PHP framework
PHP version
PHP 5.6.25
Subject
An exception has been thrown during the rendering of a template ("The block service `` does not exist") in SonataPageBundle::layout.html.twig at line 17.
Steps to reproduce
The bug is currently on y version but also on online demo version of sonata.
-Edit "global" page then swith to composer. The header container contains 3 blocks. -Edit the first block "header-top" then just click 'update'...
Expected results
Actual results
An exception has been thrown during the rendering of a template ("The block service `` does not exist") in SonataPageBundle::layout.html.twig at line 17. even after a sonata:cache:flush-all and a cache:clear, the bug still remains.
Stack Trace
Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("The block service `` does not exist") in "SonataPageBundle::layout.html.twig" at line 17. at n/a in C:\wamp64\www\sandbox-fix_installation\var\cache\dev\classes.php line 4943
[2] RuntimeException: The block service `` does not exist at n/a in C:\wamp64\www\sandbox-fix_installation\var\cache\dev\classes.php line 23827