cfconfig.exportOnStop & app.webConfigDir

0 views
Skip to first unread message

Jason Daiger

unread,
Oct 2, 2020, 11:47:54 AM10/2/20
to CommandBox
It seems the 'exportOnStop' isn't firing or isn't updating the .config.file w/in the app.webConfigDir specified for a server.  

Setup of the server.json file looks like:
"app": { "webConfigDir":"/Users/Shared/wwwroot/utility/"},
"name':"utility",
"web":{"webroot":"/Users/Shared/wwwroot/projects"}
}

Test scenario:
1. start server name="utility"
2. Open CFAdmin.  System appears to have read the .config.file from the /Users/Shared/wwwroot/utility directory properly.
3. Update any setting w/in CFAdmin
4. server stop name="utility"

The changes do not get written to the /wwwroot/utility/.config.file.  IF I copy the .config.file into the webroot directory, /wwwroot/projects, the 'Config transferred!" message is displayed and the changes made are persisted.

Am I using the webConfigDir incorrectly? Or is this behavior by design?

Thanks,
Jason



Brad Wood

unread,
Oct 2, 2020, 12:18:28 PM10/2/20
to CommandBox
Export on stop reads from the server context, not the web context.

Do a debug start and when you stop, see if you see the following output:

 logDebug( 'Exporting CFConfig from server into [#CFConfigFile#]' );


Thanks!

~Brad

Developer Advocate
Ortus Solutions, Corp 

ColdBox Platform: http://www.coldbox.org 



--
You received this message because you are subscribed to the Google Groups "CommandBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to commandbox+...@ortussolutions.com.
To view this discussion on the web visit https://groups.google.com/a/ortussolutions.com/d/msgid/commandbox/7641be0f-3dc2-495d-93dc-1347b75b81d9n%40ortussolutions.com.
Reply all
Reply to author
Forward
0 new messages