Closed FabienPapet closed 6 years ago
@FabienPapet after composer create-project symfony/website-skeleton my-project
do the following:
Run composer require sonata-project/admin-bundle:3.x@dev
Run composer require sonata-project/doctrine-orm-admin-bundle:3.x@dev
Create new file config/packages/sonata_admin.yaml
sonata_admin:
title: 'Sonata Admin'
dashboard:
blocks:
- { type: sonata.admin.block.admin_list, position: left }
sonata_block:
blocks:
sonata.admin.block.admin_list:
contexts: [admin]
Create new file config/routes/sonata_admin.yaml
admin_area:
resource: "@SonataAdminBundle/Resources/config/routing/sonata_admin.xml"
prefix: /admin
_sonata_admin:
resource: .
type: sonata_admin
prefix: /admin
Run composer auto-scripts
Soon, it won't be necessary. It will be just create-project
+ require sonata-project/doctrine-orm-admin-bundle
@FabienPapet i've updated a comment, i forgot about AdminBundle configuration. Sorry =)
Updated again
i use these steps
but now i have this error
There are no registered paths for namespace "SonataCore" in @SonataAdmin/standard_layout.html.twig at line 329.
In which file?
admin/dashboard
Uncaught PHP Exception Twig_Error_Loader: "There are no registered paths for namespace "SonataCore" in "@SonataAdmin/standard_layout.html.twig" at line 329." at /shared/httpd/focunior/vendor/twig/twig/lib/Twig/Loader/Filesystem.php line 203
I have the same error as @filippomanicone - I think it may relate to the ignoring of sonata-project/core-bundle the below output from composer require sonata-project/admin-bundle
...
Generating autoload files
Symfony operations: 8 recipes (6c8157f2f55bc9a122932d37ee4ee084)
- Configuring twig/extensions (>=1.0): From github.com/symfony/recipes:master
- Configuring symfony/translation (>=3.3): From github.com/symfony/recipes:master
- Configuring symfony/security-bundle (>=3.3): From github.com/symfony/recipes:master
- Configuring sonata-project/datagrid-bundle (>=2.3.1): From auto-generated recipe
- IGNORING sonata-project/core-bundle (>=3.9): From github.com/symfony/recipes-contrib:master
- Configuring sonata-project/block-bundle (>=3.12.0): From auto-generated recipe
- Configuring knplabs/knp-menu-bundle (>=v2.2.1): From auto-generated recipe
- Configuring sonata-project/admin-bundle (>=3.31.1): From auto-generated recipe
Executing script cache:clear
@scotchjohn you are right! There is There are no registered paths for namespace "SonataCore" in @SonataAdmin\standard_layout.html.twig at line 329.
error message if i answer 'n'
on Flex's question:
WARNING sonata-project/core-bundle (>=3.9): From github.com/symfony/recipes-contrib:master The recipe for this package comes from the "contrib" repository, which is open to community contributions. Do you want to execute this recipe? [y] Yes [n] No [a] Yes for all packages, only for the current installation session [p] Yes permanently, never ask again for this project (defaults to n): n
This is a bug in Flex and there is an issue about it https://github.com/symfony/flex/issues/291
After a recipe for sonata-project/admin-bundle
will be created, there will be more errors after refusing to install packages from recipes-contrib =)
This can be finally closed since https://github.com/symfony/recipes-contrib/pull/264 is merged.
You can now do:
composer create-project symfony/website-skeleton my-project
cd my-project
composer require sonata-project/admin-bundle
and it will work as expected 🎉
Closing!
hello, i have the same issue. There are no registered paths for namespace "SonataCore" in SonataAdminBundle::standard_layout.html.twig at line 327.
Thanks for help !
Please open a new issue ticket and follow the issue template. Thank you
hello, I have the same issue. There are no registered paths for namespace "SonataCore" in @SonataAdmin/standard_layout.html.twig at line 327.
Thanks for help !
hello, I have the same issue. There are no registered paths for namespace "SonataCore" in @SonataAdmin/standard_layout.html.twig at line 327.
Thanks for help !
Please, see the previous comment: https://github.com/sonata-project/SonataAdminBundle/issues/4910#issuecomment-443403303.
hello, I have the same issue. There are no registered paths for namespace "SonataCore" in @SonataAdmin/standard_layout.html.twig at line 327.
Thanks for help !
If there is a new ticket about this issue I couldn't find it. But in my case it was an error in my standard_layout.html.twig override. Just had to stick to the lastest version with my tweaks and it worked.
Environment
Windows 10 - Fresh install
Sonata packages
Symfony packages
PHP version
Subject
I'm trying to install Sonata admin using Symfony4.0.3 and flex
Steps to reproduce
Installation failed, reverting ./composer.json to its original content.