Reputation: 2466
I'm trying to upgrade an old project from SonataAdminBundle 2.2 to 2.3 Navigating the dashboard looks fine, but in my functional tests I'm getting the following exception:
Key "position" does not exist as the array is empty in SonataAdminBundle:Core:dashboard.html.twig at line 23
The following stack trace goes inside cached twig templates, so it doesn't help.
Upvotes: 1
Views: 111
Reputation: 2466
Looks like a simple cache learing wasn't enough. I manually deleted all files in my cache and tried again, now it works. Thanks everyone
Upvotes: 1
Reputation: 2462
Looks like you still have old template from 2.2 vesion
Look it is dashboard template from 2.2 https://github.com/sonata-project/SonataAdminBundle/blob/2.2/Resources/views/Core/dashboard.html.twig#L23 that really has "position" key of variable "block"
But if you will look to 2.3 https://github.com/sonata-project/SonataAdminBundle/blob/2.3/Resources/views/Core/dashboard.html.twig You won't see "position" key at all
So I suppose the answer is how do you "trying to upgrade" and seems you still have old stuff from 2.2
Upvotes: 1