It's not adding anything and it makes the page slower and I want it gone. Don't ask. There's little about the profiler on the website and nothing in the app config.
This setting is in app/config/config_dev.yml:
web_profiler:
toolbar: true
intercept_redirects: false
Additional: if you want to disable it for a special action in your controller than use this:
if ($this->container->has('profiler'))
{
$this->container->get('profiler')->disable();
}
If you set framework.profiler.collect to false in your config.yml, the profiler bar won't be shown (even if web_profiler.toolbar is set to true).
framework:
profiler:
collect: false
This then allows you to selectively activate collectors in your code manually, like this:
$this->container->get('profiler')->enable();
Documentation here: http://symfony.com/doc/current/reference/configuration/framework.html#collect
If you have created a new Symfony project since Symfony 2.5, these parameters are set in app/config/paramaters.yml
parameters:
# ...
debug_toolbar: true
debug_redirects: false
Just set debug_toolbar to false.
Symfony 5.3.7
I changed the toolbar value to false in the web_profiler.yaml and the toolbar was disabled.
{# [root_directory]/config/packages/dev/web_profiler.yaml #}
web_profiler:
toolbar: true --> Change to false
intercept_redirects: false
Try this
framework:
profiler: { only_exceptions: true }
in your app/config/config_dev.yml
To still get output in /_profiler but without the toolbar, you can cheat:
$request->headers->add(array('X-Requested-With' => 'XMLHttpRequest'));
That's because in WebProfilerBundle/EventListener/WebDebugToolbarListener.php there's an explicit check for this before injecting the toolbar.
If you are worried about performance - then you should not be running under dev. Dev also limits caching and can pull in additional bundles.
Run in prod mode and warm your cache before you run performance tests.
Another way that seems to disable it, is to not have _dev in the routing of the application.
So for me in a bitnami install of Symfony 2, simply by changing app/conf/httpd-app.conf slightly it would change the program:
RewriteBase /symfony/app_dev.php
to
RewriteBase /symfony/
and it would keep the toolbar from coming up.
Related
I am facing the cache issue whenever I do a new deployment, changes are not reflecting automatically. Always I have to go to the browser setting and clear the cache.
Is there a way to handle this issue automatically whenever I do the new deployment.
requirejs.config({
// Path mappings for the logical module names
paths: {
'knockout': 'libs/knockout/knockout-3.4.0',
'jquery': 'libs/jquery/jquery-3.1.1.min',
'jqueryui-amd': 'libs/jquery/jqueryui-amd-1.12.0',
'promise': 'libs/es6-promise/es6-promise.min',
'ojs': 'libs/oj/v3.2.0/min',
'ojL10n': 'libs/oj/v3.2.0/ojL10n',
'ojtranslations': 'libs/oj/v3.2.0/resources',
'signals': 'libs/js-signals/signals.min',
'text': 'libs/require/text',
'hammerjs': 'libs/hammer/hammer-2.0.8.min',
'moment': 'libs/moment/moment.min',
'ojdnd': 'libs/dnd-polyfill/dnd-polyfill-1.0.0.min',
'customElements': 'libs/webcomponents/CustomElements'
},
waitSeconds: 0,
// urlArgs will be appended at end of .js files
urlArgs: "v=1.33",
// Shim configurations for modules that do not expose AMD
shim: {
'jquery': {
exports: ['jQuery', '$']
}
},
config: {
ojL10n: {
merge: {
//'ojtranslations/nls/ojtranslations': 'resources/nls/menu'
}
}
}
});
You can update version (by changing urlArgs parameter in configuration) every time you deploy new code, thus every time new JavaScript file will be downloaded.
This can always be a problem during development. There are a couple of solutions.
1) Build into your app URL, a version string. Every time you publish a new version, change that number and the browser will pull new files
2) Set the cache control values on your server so that it doesn't cache anything from your app directory
3) Just do what you're doing with clearing browser cache. There are utilities that add a button on the browser bar to make it easier to get at.
I personally use the node http-server library to run my dev work and I use it's cache control arguments to make sure nothing is being cached.
http-server -c-1 -o
The above turns off caching and launches the browser from the current location (loading index.html if present)
With Chrome: if you open the Developer Tools (F12), on the Network tab you can check the Disable cache checkbox, which turns off caching, while the DevTools is open.
With Firefox: if you open the Developer Tools (F12), click the cogwheel icon ("Toolbox Options"), then in the "Advanced Settings" section, check the Disable Cache (when toolbox is open) checkbox.
Now there will be no caching in the browser. Might slow down stuff seriously...
How do I activate the debugger in CS Cart?
I've done this:
http://docs.cs-cart.com/4.2.x/tools/debugger.html#activate-debug-mode
i.e added the debug term while logged into the Administrator panel.
Update:
actually I'm using v 4.1.4 but the documentation is still the same.
No joy.
What else do I have to do?
If you set DEBUG_MODE to true in your config.php, and clear the cache, it will enable the debug bar.
Did you clear your cache? (path-to-your-site.com/your-admin.php?cc&ctpl)
Go to config.php file in your cs-cart root folder and uncomment below line
// Uncomment to enable the developer tools: debugger, PHP and SQL loggers, etc.
// define('DEBUG_MODE', true);
// Uncomment to enable error reporting.
// define('DEVELOPMENT', true);
I'm using Sitecore 8.0 and I have a dynamically breadcrumb and the cache settings when rendering the view:
#Html.Sitecore().Rendering(RenderIds.Breadcrumbs, new {Cacheable = true, Cache_VaryByData = true, Cache_VaryByUrl = true, Cache_VaryByParameters = true, Cache_VaryByQueryString = true })
Also the cache settings are setup in Sitecore on the rendering.
The issue is that when I access the same item coming from different paths the breadcrumb is not being updated and shows a cached path depending for what got there first. After a while it gets updated, but will fail when I go to the item through another path.
I have removed the caching settings from the view and it looks to work correctly.
Any idea why this is happening or if I should not use caching on dynamically generated content?
It is likely due to known product bug in Sitecore 8.0/8.1 which incorrectly handles in-line cache settings.
See this blog post for more info - https://vladimirhil.com/2016/02/28/html-sitecore-renderingpathorid-does-not-apply-varyby-settings/
I want to run tests with Firefox/protractor with the cache feature disabled.
(Actually, I'm trying to prevent 304 HTTP responses).
There are multiple ways to do this:
Disable the cache from the backend-side by droping Etag headers -> I can't modify the backend
Drop the Etag header from the frontend-side -> I tried, it did not work
Disable the cache from firefox: I just have to set the flag network.http.use-cache to false
Manually it works. I receive only 200 responses and it's great.
I want to be able to set this flag through protractor configuration. After some search I found out that I had to create a custom profile and set it in protractor this way (https://code.google.com/p/selenium/wiki/DesiredCapabilities):
capabilities: {
browserName: 'firefox',
firefox_profile: 'support/firefox_profile'
}
The problem is that the firefox profile is not considered. Is it the right option?
Do you have a better idea?
Thanks for your help.
EDIT:
As someone (suggested
capabilities: {
prefs: {
'config.http.use-cache': false
}
}
It did not work - I checked in about:config, the flag was still enabled.
How do you know what options you can pass in the capabilities?
Here's an example of how to integrate firefox-profile with protractor: https://github.com/juliemr/protractor-demo/tree/master/howtos/setFirefoxProfile
EDIT: For those upgrading to protractor >=1.6, the old way of doing this was broken because 'browser' can no longer return a promise. The demo has been updated.
In my SenchaTouch 2 app the first lines in app.js read:
Ext.Loader.setConfig( {enabled: true, disableCaching: false} );
Ext.data.Connection.disableCaching = false;
Ext.data.JsonP.disableCaching = false;
Ext.data.proxy.Server.prototype.noCache = false;
Ext.Ajax.disableCaching = false;
The app compiles to the production version without errors or warnings. It loads and runs from the server. When I try to run it offline in Chrome, those 404 errors occur
GET http://myServer/m/Override/...=1346682646496 /m/Override/slider/Slider.js?_dc=1346682646496:1
GET http://myServer/m/app.json?1346682646693 /m/:6
which indicate that the timestamp of the disableCache parameter is appended to the GET requests. Therefore the application does not load offline. It hangs at the "Application is being loaded..." screen. How can I enable caching and avoid this _dc parameter?
The SDK version is 2.0.1.1
-- update: Found workaround. Integrated Slider.js in app.js
This is a known bug or rather the feature was not implemented properly. It didnt work for me in sencha 2.1 either.