Closed jasperdcbe closed 9 years ago
Can you provide a stack trace ?
I tried to run cache:clear in verbose mode but no extra information here: www-data@packer-virtualbox-iso:~/csmb$ app/console cache:clear -vvv Clearing the cache for the dev environment with debug true PHP Fatal error: Class 'Sonata\MediaBundle\Controller\MediaAdminController' not found in /var/www/vendor/sonata-project/formatter-bundle/Controller/CkeditorAdminController.php on line 21
I went through the list of used bundles and disabled "JmsDiExtraBundle" and this solved the problem. Thanks for the quick response.
@jasperdcbe so it seems to be an issue with JmsDIExtraBundle. So if you want to use JmsDIExtraBundle and SonataFormatterBundle, you need to install optionals dependencies as JMS introspection can load non existant class.
Indeed @rande, after doing some research I came to the conclusion the JmsDiExtraBundle was not really necessary in this project anyway so I removed it and now the formatter block is working nicely with SonataPageBundle :-)
If you still need the JmsDiExtraBundle, add following code to your symfony app config.
jms_di_extra:
cache_warmer:
controller_file_blacklist:
- /var/www/vendor/sonata-project/formatter-bundle/Controller/CkeditorAdminController.php
Thanks @Davidmattei, helped me a lot. I changed your config a bit:
cache_warmer:
controller_file_blacklist:
- %kernel.root_dir%/../vendor/sonata-project/formatter-bundle/Controller/CkeditorAdminController.php
@sagikazarmark can you add this to the docs? or what can we do to "fix" this?
Not sure yet what the problem is, but will try to look into it. Until then, this is google first hit.
:+1: :smile:
Hi there, I just included the SonataFormatterBundle in one of our projects and I noticed that there is a hard dependency on the SonataMediaBundle. Is there any way around this by changing the configuration?
When clearing the Symfony cache I receive the following exception: PHP Fatal error: Class 'Sonata\MediaBundle\Controller\MediaAdminController' not found in /var/www/vendor/sonata-project/formatter-bundle/Controller/CkeditorAdminController.php on line 21