I’m having a hard time overriding a module’s setting using /config/coldbox.cfc. Every time I go into the module and dump out it’s settings I don’t see the overridden value. I must be missing something simple. Here’s what I’m trying to do:
I created a tracked “admin” module in modules_app. The module works and I can browse it by going to /admin/ in the browser.
I have the following in my /modules_app/admin/ModuleConfig.cfc
function configure(){
settings = {
posts = {
enabled = true
}
};
}
I want to override the posts.enabled
value in the app so when I visit /admin/ the value of posts.enabled
will be false. I have the following in my /config/coldbox.cfc:
moduleSettings = {
admin: {
posts: {
enabled: false
}
}
}
I added the following debug output to my Main layout inside the “admin” module’s homepage (/admin/)
<cfdump var="#getModuleSettings( "admin" )#" /><cfabort>
I still see that posts.enabled
has a value of true.
I also tried injecting the module settings in a handler but received the same result
property name=“settings” inject=“coldbox:modulesettings:admin”;
These are the docs I’m working from for reference:
https://coldbox.ortusbooks.com/hmvc/modules/moduleconfig/module-settings
Do you see something critical I’m missing?