Open gonzalovilaseca opened 10 years ago
It seems that the problem comes from the profiler, sonata block bundle adds sonata.block.templating.helper
to the profiler data_collector
, and that is the reason for the circular reference exception.
I'm going to look further into this.
thanks and good luck! please tell if you find something.
its pretty busy here, did not have time to look into it myself.
Hello gonzalovilaseca, did you manage to do something with this error?
I haven't had the time to look further, I found that if you disable the data_collector in the sonata bundle, you can temporarily fix it. I have to look further..I just don't know when I'll have the time. Are you getting this error too?
I'm not not sure that it is exactly the same error but I also have a circular reference. it append when i Upgrade sf2.1 to 2.3 solving all dependancies about sonata.
as the path is almost the same I was hopping that you solved it :-)
@gonzalovilaseca I manage to isolate from where the problem was originate.
The BlockBundle add into the profiler a custom dataCollector to show the blocks list in the profiler. If I disable this service, declared in the vendor sonataBlockBundle it works like a charm.
I'm looking deeper to see if I have in my app a service that would require a service required by the vendor service.
'sonata.block.data_collector' declared in: vendor/sonata-project/block-bundle/DependencyInjection/SonataBlockExtension.php
maybe the service that dataCollector service could be made lazy to solve the circularity issue?
Thanks @dbu, I tried to set into the vendor definition to lazy but it didn't solve the circular reference.
does the problem also occur with only sonata cache and sonata block, without cmf block? or does sonata do some clever trick with their service that we could mimick?
Actually I have no idea, I just get a full web app with a lot of bundles configured. the app is to much integrate with CMF to be able to deactivate it. (mainly the order for routers between sf and sonata)
sorry, i also don't know enough why this starts to happen or what to do without digging deep into it - for which i unfortunately have no time at this point.
can you deactivate profiling in the sonata block bundle to break the circle?
@rmsint i think you originally added this. can you help us where this comes from? do you have any idea how to break the circle or where to look for the cause of that circle?
Thanks for your reply, I completely understand your lack of time, I already disable it in my dev vendors, Until a possible answer or finding of the problem, do you think it could be possible to add a parameter to disable this dataCollector ?
that could make sense yes. but would need to be done in the sonata bundle, not here, right? you would have to ask rande for sonata, or just propose a PR.
Oo That's right, I thought I was on it. i'll try to do the PR as soon as I can Thanks for your answers.
ping
I haven't looked further, but this configuration disables de profiler listener:
sonata_block:
profiler:
#If the profiler is enabled a circular reference exception is launched
enabled: false
container_types: ~
I'm trying to run Esi with CMF Block bundle, but I'm getting this exception:
cmf.block.cache.varnish
needsfragment.handler
. The following call is done in a compiler pass onfragment.handler
:And
fragment.renderer.inline
needshttp_kernel
, so a circular exception is raised. Any ideas on how to solve it?