EasyAdminBundle: [3.0.0-dev] Variable "ea" does not exist.
Variable “ea” does not exist. I’m following , https://symfony.com/doc/master/bundles/EasyAdminBundle/index.html UPGRADED FROM 2 TO 3, by following: https://symfony.com/doc/master/bundles/EasyAdminBundle/upgrade.html
And created my dashboard using https://symfony.com/doc/master/bundles/EasyAdminBundle/dashboards.html at https://symfony.com/doc/master/bundles/EasyAdminBundle/dashboards.html#dashboard-route
This is my first run after upgrading to 3.0. Throws error: Variable “ea” does not exist.
and debug toolbar error log is:
| Uncaught PHP Exception Twig\Error\RuntimeError: "Variable "ea" does not exist." at /project/vendor/easycorp/easyadmin-bundle/src/Resources/views/layout.html.twig line 2 { "exception": {} } -- | --
At line 2 in layout.html.twig:
{% trans_default_domain ea.i18n.translationDomain %}
composer: “easycorp/easyadmin-bundle”: “3.0.x-dev”
I don’t have any yaml config files.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 29 (24 by maintainers)
Solution: Update Symfony to 5.1 so its works by me.
Got the same problem with a simple native Symfony
AbstractControllerthat renders a template which extends@EasyAdmin/layout.html.twig. The ea twig global injection and other magic happens in theAdminContextListener. First check there is if the controller is a EasyAdmin controller (DashboardControllerInterface).Extending AbstractDashboardController instead of AbstractController fixed it for me. No problem for that part of my application so far. You can also just implement
DashboardControllerInterfaceand add the required methods. I added an example … did it anyway.Yes it worked for me too. Updated to Symfony v5.1. So, I’m closing this. Thanks to all.
Is it a bug? Or symfony missconfiguration? @javiereguiluz
@rogergerecke I got the same error first. Here is the point to follow.
Ok work. After cache clear
I just migrated my old Easyadmin 2.3.7 to 3.x alpha 7 with latest Symfony 5.0.8 and the same error