This blogpost is about setting up the OSGi-config nodes in your repository, instead of doing manual changes via the Felix-console.
So why not via the Felix-console? Well of course that is possible, but someone has to execute those steps on the different environments.
When the OSGi-config nodes are inside a package you can easily deploy that, and the config changes are applied automatically.
When I go on-site at a new customer or partner, then one of the first things I do is adding ?debug=layout on the publish/dispatcher environment.
Most of the times people are amazed with the result (ahum not :-)), this option shows you all the components on the page.
This feature can be enabled/disabled via an OSGi-config setting, so let’s take this one to guide you through the process.
First we have a look on this configuration via the Felix console (/system/console/configMgr)
Please note the PID “com.day.cq.wcm.core.impl.WCMDebugFilter”, and the name of the setting “wcmdbgfilter.enabled”.
These items are essential for the next steps.
When the checkbox is unchecked then adding the parameter ?debug=layout doesn’t work anymore
DON’T CHANGE ANYTHING HERE…
1. Create config-folder
Create a new folder “config” in the /apps directory
2. Create the config-node
Now create a new node “com.day.cq.wcm.core.impl.WCMDebugFilter” (the PID) of the type “sling:OsgiConfig”
3. Add the config-property
In this node create a new property “wcmdbgfilter.enabled” with the boolean value false.
After adding the property save the changes
When you now return to the Felix-console, refresh the page you see now that the checkbox is unchecked!
So this is a great result, but we have now disabled it in author-mode. Where it should only be disabled in publish.
What you can do now is to add the runmode after “config” in the config-folder, to have the setting enabled in that runmode.
If you now rename config to config.publish, and refresh the Felix-console that setting is enabled again (because we are in author).
If you rename the folder to config.author the setting will be disabled in author.
When you have reached this stage you can now create an export for the config-settings and import these on other CQ-instances and the settings will be applied without soneone having to go into the Felix-console.