JMSDiExtraBundle icon indicating copy to clipboard operation
JMSDiExtraBundle copied to clipboard

Trouble with config

Open maninhat opened this issue 12 years ago • 15 comments
trafficstars

I want to use this bundle. but it has problem with sonata/mediaBundle. FatalErrorException: Error: Class 'Sonata\BlockBundle\Block\BaseBlockService' not found in ..../www/vendor/sonata-project/media-bundle/Sonata/MediaBundle/Block/MediaBlockService.php

I tried to exclude MediaBundle with config parameters: jms_di_extra: locations: all_bundles: false bundles: [B2BSiteBundle, B2BMessageBundle] directories: ["%kernel.root_dir%/../src"]

but it does not help

maninhat avatar Jul 16 '13 08:07 maninhat

The exception has nothing to do with JMSDiExtraBundle. It is thrown in SonataMediaBundle

stof avatar Jul 16 '13 08:07 stof

Yes, but without JMSDiExtraBundle all work perfectly. Because i don't use base block service. When include JMSDiExtraBundle throwing fatal exception. I think JMSDiExtraBundle look into SonataMediaBundle and do something with it.

maninhat avatar Jul 16 '13 11:07 maninhat

Can you paste the stack trace of the exception ? It could help debugging this

stof avatar Jul 16 '13 11:07 stof

i see only: Whoops, looks like something went wrong. 1/1FatalErrorException: Error: Class 'Sonata\BlockBundle\Block\BaseBlockService' not found in /usr/local/chroots/devel/agreg/www/vendor/sonata-project/media-bundle/Sonata/MediaBundle/Block/MediaBlockService.php line 37 in /usr/local/chroots/devel/agreg/www/vendor/sonata-project/media-bundle/Sonata/MediaBundle/Block/MediaBlockService.php line 37 apache error.log has same message

maninhat avatar Jul 16 '13 12:07 maninhat

You are giving me the error message only, not the stack trace

stof avatar Jul 16 '13 13:07 stof

How can i see "stack trace"?

maninhat avatar Jul 16 '13 13:07 maninhat

are you getting the error in the browser or in the CLI ?

stof avatar Jul 16 '13 13:07 stof

in the browser

maninhat avatar Jul 16 '13 16:07 maninhat

then simply look at the following lines of the error page. It should display the full stack trace of the exception

stof avatar Jul 16 '13 16:07 stof

There is no following lines after error message. On error page displays only FatalErrorException that i posted above

maninhat avatar Jul 17 '13 11:07 maninhat

do you have xdebug enabled ?

stof avatar Jul 17 '13 12:07 stof

just installed stack trace:

in /usr/local/chroots/devel/agreg/www/vendor/sonata-project/media-bundle/Sonata/MediaBundle/Block/MediaBlockService.php line 37
at ErrorHandler->handleFatal() in /usr/local/chroots/devel/agreg/www/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php line 0
in /usr/local/chroots/devel/agreg/www/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/DebugClassLoader.php line 96
at DebugClassLoader->loadClass() in /usr/local/chroots/devel/agreg/www/vendor/jms/aop-bundle/JMS/AopBundle/DependencyInjection/Compiler/PointcutMatchingPass.php line 0
at ??class_exists() in /usr/local/chroots/devel/agreg/www/vendor/jms/aop-bundle/JMS/AopBundle/DependencyInjection/Compiler/PointcutMatchingPass.php line 96
at PointcutMatchingPass->processDefinition() in /usr/local/chroots/devel/agreg/www/vendor/jms/aop-bundle/JMS/AopBundle/DependencyInjection/Compiler/PointcutMatchingPass.php line 59
at PointcutMatchingPass->process() in /usr/local/chroots/devel/agreg/www/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php line 119
at Compiler->compile() in /usr/local/chroots/devel/agreg/www/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php line 629
at ContainerBuilder->compile() in /usr/local/chroots/devel/agreg/www/app/bootstrap.php.cache line 2362
at Kernel->initializeContainer() in /usr/local/chroots/devel/agreg/www/app/bootstrap.php.cache line 2142
at Kernel->boot() in /usr/local/chroots/devel/agreg/www/app/bootstrap.php.cache line 2173
at Kernel->handle() in /usr/local/chroots/devel/agreg/www/web/app_dev.php line 29
at ??{main}() in /usr/local/chroots/devel/agreg/www/web/app_dev.php line 0

maninhat avatar Jul 17 '13 13:07 maninhat

Are you sure you want to include your src directory for parsing? I don't know where your bundles live, but if they're in that directory, that may be the issue.

shieldo avatar Aug 01 '13 09:08 shieldo

Without directories: ["%kernel.root_dir%/../src"] i have same error.

maninhat avatar Aug 02 '13 10:08 maninhat

Thanks - it's good to rule that out. In that case, it looks like a similar issue to #126 - bundles being parsed that haven't been explicitly configured to be parsed.

shieldo avatar Aug 02 '13 10:08 shieldo