Domanda

Fatal error: Class 'Sonata\jQueryBundle\SonatajQueryBundle' not found in /Users/.../app/AppKernel.php on line 21

I'm getting the above error after upgrading the SonataAdminBundle versions to dev-master in my composer.json and doing a composer update in order to try the new Bootstrap3 layout.

Does this now have to be added manually as a dependency? It seems like the jquery bundle has now been removed as if I comment out line 21, the site loads but none of the jquery assets are loaded.

È stato utile?

Soluzione

Assets management has been improved in the upcoming stable version. The SonataAdminBundle now uses bower to handle assets (https://github.com/sonata-project/SonataAdminBundle/issues/2036).

So if you update your code, you will need to remove SonatajQueryBundle. Also, there is a new configuration section to add your assets in the AdminBundle. So you can have a fine control on which assets are loaded in your project. (https://github.com/sonata-project/SonataAdminBundle/blob/master/Resources/doc/reference/configuration.rst).

Last point, if you have overwritten the default template, you might need to adjust it to properly load assets.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top