Comments (19)
do you not have the WebProfilerBundle enabled?
from sonatablockbundle.
hmm reading the code it shouldnt matter:
if (!$config['profiler']['enabled']) {
$container->setAlias('sonata.block.renderer', 'sonata.block.renderer.default');
$container->removeDefinition('sonata.block.renderer.traceable');
return;
}
from sonatablockbundle.
ah .. imho this should additionally check if the bundle is enabled similar to how we check for the SonataAdminBundle here https://github.com/symfony-cmf/MenuBundle/blob/master/DependencyInjection/SymfonyCmfMenuExtension.php#L70
from sonatablockbundle.
Yes I have WebProfilerBundle enabled
Service debug.stopwatch is visible in command line (app/console container:debug)
from sonatablockbundle.
i assume you have tried to manually clear your cache?
from sonatablockbundle.
yes
from sonatablockbundle.
for the correct environment? the error message you pasted simply cannot happen if you do have the debug.stopwatch
service. so this doesnt point to an issue in the bundle per se but rather that there is some inconsistency.
from sonatablockbundle.
I have the same problem, in the dev environment, everything works fine, in the prod environment the above error is thrown.
Also when clearing the cache, this one works:
app/console cache:clear --env=prod
This one triggers the error:
app/console cache:clear --env=prod --no-debug
I guess the stopwatch service is not available in the prod environment.
from sonatablockbundle.
aha! .. so you dont have the profiler enabled but you do have profiling enabled in sonata block bundle.
from sonatablockbundle.
but this is a bit trickier to check for without a compiler pass. i can submit a fix that makes the service optional but it would still mean that people have profiling enabled without actually being able to profile
from sonatablockbundle.
I really don't understand. I use the block bundle "passively", as it's needed for sonata-admin. I did not "enable profiling" or configure anything related to the block bundle.
from sonatablockbundle.
profiling is enabled by default when you are in debug mode. however in prod it should be disabled and therefore this trace service shouldnt even be used. so from my point of view you either enabled debugging in prod or you did infact set profiling to enabled in the block bundle.
from sonatablockbundle.
at any rate .. can you try this PR #61 ?
from sonatablockbundle.
Yeah, that fixes it. I can clear the cache with "--no-debug" and the page does not throw the error in the prod environment anymore.
from sonatablockbundle.
Im waiting for merge PR
from sonatablockbundle.
done
from sonatablockbundle.
The problem lies not in the console only: http://stackoverflow.com/q/16563442/842697
I fix it merging manually #61. How could I get the fix with composer? (Sorry if this is offtopic)
from sonatablockbundle.
Same here can you release 2.2.2
because this is an issue happening in production env?
from sonatablockbundle.
It's been fixed in 2.2.3
, thanks ;)
from sonatablockbundle.
Related Issues (20)
- Bug in (lazy-loading) group property on validator component HOT 1
- sonata-project/cache abandoned but still required HOT 2
- Add tag `sonata.block` to services implementing `BlockServiceInterface` HOT 1
- Sonata Block Bundle Edit form dont save EntityType HOT 1
- Remove Sonata cache HOT 3
- Problem to use the last version 4.17 HOT 2
- Deprecate ContainerBlockService on 4.x HOT 3
- Dependency SonataCache abandoned HOT 1
- With a twig error, blocks profiler KO Notice: unserialize(): Error at offset HOT 5
- Create `UPGRADE-4.0.md` HOT 4
- Remove Sonata Cache HOT 9
- Can't install block bundle on symfony 4.3 HOT 3
- Make BlockExtension a lazy extension HOT 1
- Upgrade block-bundle to 4.x in sonata-project bundles HOT 5
- Return only string in BlockContextInterface::getTemplate HOT 4
- Saving a block assign the wrong template to that block
- Saving a child block assign the wrong type to that block (breaking the page composer forever)
- Use a service locator for `BlockServiceManager` HOT 3
- BlockBundle navigation menu is incorrectly duplicated to TimelineBundle navigation menu HOT 1
- Not enough information about User Deprecated: sonata-project/block-bundle HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sonatablockbundle.