avanzu / AdminThemeBundle

Admin Theme based on the AdminLTE Template for easy integration into symfony
MIT License
280 stars 148 forks source link

Unable to find template "AvanzuAdminThemeBundle::layout::default-layout.html.twig" #207

Closed nickicool closed 6 years ago

nickicool commented 6 years ago

Debug info

Component Version
Symfony version 4.0.1
AdminThemeBundle 2.0.0 beta.10

I tried to install AdminThemeBundle, I have Win7 OS. When I want to start using Bundle:

{% extends 'AvanzuAdminThemeBundle:layout:default-layout.html.twig' %}

I get

Unable to find template "AvanzuAdminThemeBundle:layout:default-layout.html.twig" (looked into: D:\OpenServer\domains\symfony4.local/templates, D:\OpenServer\domains\symfony4.local/templates, D:\OpenServer\domains\symfony4.local\vendor\symfony\twig-bridge/Resources/views/Form) in Admin\base.html.twig at line 1.

My bundles.php:

return [ Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle::class => ['all' => true], Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true], Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true], Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true], Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], Avanzu\AdminThemeBundle\AvanzuAdminThemeBundle::class => ['all' => true], ];

======== And when I try use comand php bin/console avanzu:admin:initialize I get message:

2017-12-05T15:39:04+03:00 [error] Error thrown while running command ""avanzu:admin:initialize"". Message: "There are no commands defined in the "avanzu:admin" namespace."

There are no commands defined in the "avanzu:admin" namespace.

nickicool commented 6 years ago

If replace {% extends 'AvanzuAdminThemeBundle:layout:default-layout.html.twig' %} on {% extends '@AvanzuAdminTheme/layout/default-layout.html.twig' %} - the template is successfully find!

But appears a new errors (one by one) with including templates:

Unable to find template "AvanzuAdminThemeBundle:Partials:_head.html.twig" ......... in @AvanzuAdminTheme\layout\default-layout.html.twig at line 11. Unable to find template "AvanzuAdminThemeBundle:Partials:_footer.html.twig" ........ in @AvanzuAdminTheme\layout\default-layout.html.twig at line 339. ... and other similar template including. They are all fixed as like this - just change: {% include('AvanzuAdminThemeBundle:Partials:_head.html.twig') %} on {% include('@AvanzuAdminTheme/Partials/_head.html.twig') %}.

But there are more errors visualization controller, like this:

Unable to find template "AvanzuAdminThemeBundle:Sidebar:search-form.html.twig" (looked into: D:\OpenServer\domains\symfony4.local/templates, D:\OpenServer\domains\symfony4.local/templates, D:\OpenServer\domains\symfony4.local\vendor\symfony\twig-bridge/Resources/views/Form). ... screenshot this error https://yadi.sk/i/wkQI6QfJ3QLueT .

I'm just new to Symfony and don't know how to fix the error. You will correct these errors in bundle or not?

shakaran commented 6 years ago

@nickicool you are using Symfony 4, released some days ago. This bundle only have support for Symfony 2 and Symfony 3 for the moment