maZahaca/sonata-admin-tree-bundle

Unable to find template

DimaSerikov opened this issue · 5 comments

Hi, how can I fix this error?

CRITICAL - Uncaught PHP Exception Twig_Error_Loader: "Unable to find template "SonataAdminBundle:CRUD:list_outer_rows_tree.html.twig" (looked into: /***/***/***/***/app/Resources/views, /***/***/***/***/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form, /***/***/***/***/vendor/knplabs/knp-menu/src/Knp/Menu/Resources/views) in "SonataAdminBundle:CRUD:base_list.html.twig" at line 94." at /***/***/***/***/vendor/twig/twig/lib/Twig/Loader/Filesystem.php line 226

It happens when I pressing the tree-view button on show table view in admin

Hi,
Can you provide you composer.json file for better understanding which Symfony and Sonata vendors you have installed?

Hi,

"require": {
"php": ">=5.3.9",
"doctrine/doctrine-bundle": "~1.4",
"doctrine/doctrine-migrations-bundle": "^1.0",
"doctrine/orm": "^2.4.8",
"friendsofsymfony/rest-bundle": "^2.2",
"incenteev/composer-parameter-handler": "~2.0",
"jms/serializer-bundle": "^2.1",
"nelmio/api-doc-bundle": "^2.13",
"redcode/tree-bundle": "@dev",
"sensio/distribution-bundle": "~4.0",
"sensio/framework-extra-bundle": "^3.0.2",
"sonata-project/admin-bundle": "^3.23",
"sonata-project/doctrine-orm-admin-bundle": "^3.1",
"sonata-project/user-bundle": "^3.2",
"symfony/finder": "^3.3",
"symfony/monolog-bundle": "^3.0.2",
"symfony/swiftmailer-bundle": "~2.3,>=2.3.10",
"symfony/symfony": "2.8.*",
"twig/twig": "^1.0||^2.0"
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^2.3",
"sensio/generator-bundle": "~3.0",
"symfony/phpunit-bridge": "~2.7"
},

Same issue.

Unable to find template "SonataAdminBundle:CRUD:list_outer_rows_tree.html.twig" (looked into: /www/bgtinside/app/Resources/views, /www/bgtinside/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form, /www/bgtinside/vendor/knplabs/knp-menu/src/Knp/Menu/Resources/views) in SonataAdminBundle:CRUD:base_list.html.twig at line 94.

Done exactly as readme install instructions.
Interesting issue: if I revert changes in admin-service configuration, clear cache and try to access this admin page - error is still there. maybe it's related to Nested behaviour of Entity, other admin pages without Nested are fine.

asm89/twig-cache-extension               1.3.2                    Cache fragments of templates directly within Twig.
bankturov/dictionary-bundle              dev-default 89c8a6cacaff 
bankturov/search-bundle                  dev-default 34d403a5f300 
bankturov/theme-bundle                   dev-default 118dec1ba7e0 
beberlei/DoctrineExtensions              v1.0.19                  A set of extensions to Doctrine 2 that add suppor...
behat/transliterator                     v1.2.0                   String transliterator
cocur/slugify                            v2.5                     Converts a string into a slug.
composer/ca-bundle                       1.0.9                    Lets you find a path to the system CA bundle, and...
doctrine/annotations                     v1.5.0                   Docblock Annotations Parser
doctrine/cache                           v1.7.1                   Caching library offering an object-oriented API f...
doctrine/collections                     v1.5.0                   Collections Abstraction library
doctrine/common                          v2.8.1                   Common Library for Doctrine projects
doctrine/dbal                            v2.6.3                   Database Abstraction Layer
doctrine/doctrine-bundle                 1.8.1                    Symfony DoctrineBundle
doctrine/doctrine-cache-bundle           1.3.2                    Symfony Bundle for Doctrine Cache
doctrine/inflector                       v1.2.0                   Common String Manipulations with regard to casing...
doctrine/instantiator                    1.1.0                    A small, lightweight utility to instantiate objec...
doctrine/lexer                           v1.0.1                   Base library for a lexer that can be used in Top-...
doctrine/orm                             v2.5.12                  Object-Relational-Mapper for PHP
egeloen/ckeditor-bundle                  5.0.3                    Provides a CKEditor integration for your Symfony2...
egeloen/json-builder                     3.0.0                    JSON builder with escaping control for PHP 5.6+
friendsofsymfony/jsrouting-bundle        1.6.3                    A pretty nice way to expose your Symfony2 routing...
friendsofsymfony/user-bundle             v1.3.7                   Symfony FOSUserBundle
gedmo/doctrine-extensions                v2.4.31                  Doctrine2 behavioral extensions
iakumai/sphinxsearch-bundle              dev-master cf62294       Sphinx search bundle for Symfony 2
imagine/imagine                          v0.6.3                   Image processing for PHP 5.3
incenteev/composer-parameter-handler     v2.1.2                   Composer script handling your ignored parameter file
ircmaxell/password-compat                v1.0.4                   A compatibility library for the proposed simplifi...
jdorn/sql-formatter                      v1.2.17                  a PHP SQL highlighting library
jms/metadata                             1.6.0                    Class/method/property metadata management in PHP
jms/parser-lib                           1.0.0                    A library for easily creating recursive-descent p...
jms/serializer                           1.9.2                    Library for (de-)serializing data of any complexi...
jms/serializer-bundle                    2.2.0                    Allows you to easily serialize, and deserialize d...
knplabs/gaufrette                        v0.3.1                   PHP5 library that provides a filesystem abstracti...
knplabs/knp-components                   1.3.5                    Knplabs component library
knplabs/knp-markdown-bundle              1.5.1                    Knplabs markdown bundle transforms markdown into ...
knplabs/knp-menu                         2.3.0                    An object oriented menu library
knplabs/knp-menu-bundle                  2.1.3                    This bundle provides an integration of the KnpMen...
knplabs/knp-paginator-bundle             v2.6.0                   Paginator bundle for Symfony2 to automate paginat...
kriswallsmith/assetic                    v1.4.0                   Asset Management for PHP
kriswallsmith/buzz                       v0.15.2                  Lightweight HTTP client
michelf/php-markdown                     1.7.0                    PHP Markdown
mobiledetect/mobiledetectlib             2.8.26                   Mobile_Detect is a lightweight PHP class for dete...
monolog/monolog                          1.23.0                   Sends your logs to files, sockets, inboxes, datab...
mpdf/mpdf                                v6.1.3                   A PHP class to generate PDF files from HTML with ...
multifinger/app-settings-bundle          dev-master 1e0f932       
multifinger/declension-bundle            dev-master f9e42fa       
multifinger/utilities-bundle             dev-master 695104c       
paragonie/random_compat                  v2.0.11                  PHP 5.x polyfill for random_bytes() and random_in...
phpcollection/phpcollection              0.5.0                    General-Purpose Collection Library for PHP
phpoffice/phpspreadsheet                 dev-master 59326f1       PHPSpreadsheet - Read, Create and Write Spreadshe...
phpoption/phpoption                      1.5.0                    Option Type for PHP
psr/log                                  1.0.2                    Common interface for logging libraries
psr/simple-cache                         1.0.0                    Common interfaces for simple caching
redcode/tree-bundle                      0.1-alpha                This Symfony bundle integrates jsTree and Gedmo N...
sensio/distribution-bundle               v5.0.21                  Base bundle for Symfony Distributions
sensio/framework-extra-bundle            v3.0.28                  This bundle provides a way to configure your cont...
sensio/generator-bundle                  v3.1.6                   This bundle generates code for you
sensiolabs/security-checker              v4.1.6                   A security checker for your composer.lock
setasign/fpdi                            1.6.2                    FPDI is a collection of PHP classes facilitating ...
sonata-project/admin-bundle              3.27.0                   The missing Symfony Admin Generator
sonata-project/block-bundle              3.5.0                    Symfony SonataBlockBundle
sonata-project/cache                     2.0.0                    Cache library
sonata-project/classification-bundle     3.4.0                    Symfony SonataClassificationBundle
sonata-project/core-bundle               3.7.0                    Symfony SonataCoreBundle
sonata-project/datagrid-bundle           2.3.0                    Symfony SonataDatagridBundle
sonata-project/doctrine-extensions       1.0.2                    Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 3.1.7                    Symfony Sonata / Integrate Doctrine ORM into the ...
sonata-project/easy-extends-bundle       2.2.0                    Symfony SonataEasyExtendsBundle
sonata-project/exporter                  1.7.1                    Lightweight Exporter library
sonata-project/formatter-bundle          3.3.0                    Symfony SonataFormatterBundle
sonata-project/google-authenticator      2.0.0                    Library to integrate Google Authenticator into a ...
sonata-project/intl-bundle               2.3.2                    Symfony SonataIntlBundle
sonata-project/media-bundle              3.9.0                    Symfony SonataMediaBundle
sonata-project/notification-bundle       3.2.0                    Symfony SonataNotificationBundle
sonata-project/user-bundle               3.5.0                    Symfony SonataUserBundle
stof/doctrine-extensions-bundle          v1.2.2                   Integration of the gedmo/doctrine-extensions with...
suncat/mobile-detect-bundle              v1.0.6                   Symfony2/3 bundle for detect mobile devices, mana...
swiftmailer/swiftmailer                  v5.4.8                   Swiftmailer, free feature-rich PHP mailer
symfony/assetic-bundle                   v2.8.2                   Integrates Assetic into Symfony2
symfony/monolog-bundle                   v2.12.1                  Symfony MonologBundle
symfony/phpunit-bridge                   v2.8.31                  Symfony PHPUnit Bridge
symfony/polyfill-apcu                    v1.6.0                   Symfony polyfill backporting apcu_* functions to ...
symfony/polyfill-intl-icu                v1.6.0                   Symfony polyfill for intl's ICU-related data and ...
symfony/polyfill-mbstring                v1.6.0                   Symfony polyfill for the Mbstring extension
symfony/polyfill-php54                   v1.6.0                   Symfony polyfill backporting some PHP 5.4+ featur...
symfony/polyfill-php55                   v1.6.0                   Symfony polyfill backporting some PHP 5.5+ featur...
symfony/polyfill-php56                   v1.6.0                   Symfony polyfill backporting some PHP 5.6+ featur...
symfony/polyfill-php70                   v1.6.0                   Symfony polyfill backporting some PHP 7.0+ featur...
symfony/polyfill-util                    v1.6.0                   Symfony utilities for portability of PHP codes
symfony/security-acl                     v3.0.0                   Symfony Security Component - ACL (Access Control ...
symfony/swiftmailer-bundle               v2.6.7                   Symfony SwiftmailerBundle
symfony/symfony                          v2.8.31                  The Symfony PHP framework
twig/extensions                          v1.5.1                   Common additional features for Twig that do not d...
twig/twig                                v2.4.4                   Twig, the flexible, fast, and secure template lan...
willdurand/jsonp-callback-validator      v1.1.0                   JSONP callback validator.
yadelivery/name-case-lib                 1.1.1                    Library for inflecting Russian and Ukrainian Name...
zendframework/zenddiagnostics            v1.0.9                   A set of components for performing diagnostic tes...

same problem here 👍

Hello!

Add into framework.yaml

templating:

    engines: ['twig']