key [BLOGBOX] doesn't exist in struct (keys:)

I’m having another odd issue.

I have everything working on my local machine just fine, but when I try to run it on my server I’m getting this:

Railo 3.3.0.023 Error (expression)
Message key [BLOGBOX] doesn’t exist in struct (keys:)
Stacktrace The Error Occurred in
/tomcat7/sites/blog/ROOT/modules/blogbox-ui/ModuleConfig.cfc: line 28

26:
27: // BLOGBOX MODULE LOCATION: CHANGE IF DIFFERENT FROM CONVENTIONS
28: var BB_PATH = controller.getSetting(“modules”).blogbox.invocationPath;
29:
30: // BB UI SES Routing

called from/tomcat7/sites/blog/ROOT/coldbox/system/web/services/ModuleService.cfc: line 473

For some reason, controller.getSetting(“modules”) is returning a blank struct every time.

I have copied my exact working folders up to the server, using the same versions of Railo, ColdBox, etc

If I do a writeDump(instance.moduleRegistry); inside registerAllModules() before the registerModule() call I see this correctly:

Struct
INVOCATIONPATH
string modules
LOCATIONPATH
string /modules
PHYSICALPATH
string /tomcat7/sites/blog/ROOT/modules
string blogbox

Struct
INVOCATIONPATH
string modules
LOCATIONPATH
string /modules
PHYSICALPATH
string /tomcat7/sites/blog/ROOT/modules
string forgebox

Struct
INVOCATIONPATH
string modules
LOCATIONPATH
string /modules
PHYSICALPATH
string /tomcat7/sites/blog/ROOT/modules
string blogbox-admin

Struct
INVOCATIONPATH
string modules
LOCATIONPATH
string /modules
PHYSICALPATH
string /tomcat7/sites/blog/ROOT/modules

But inside the first registerModule() if I do this:

writedump(controller.getSetting(“modules”)); I see a blank struct.

On my local machine, if I do:

writeDump(controller.getSetting(“modules”));

right before:

var BB_PATH = controller.getSetting(“modules”).blogbox.invocationPath;

I see the modules, but on my server I just get a blank struct.

Any thoughts about this?

hmm, not really

Luis F. Majano
President
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

A further curiosity…

On my working local copy, in ModuleService.cfc

Running:

writeDump(controller.getSetting(“modules”));

Just before and just after:

instance.mConfigCache[modName] = loadModuleConfiguration(mConfig);

Both show an empty struct.

Running it before:

modulesConfiguration[modName] = mConfig;

Also comes up empty, but running AFTER that line it comes up populated, which makes sense, modulesConfiguration is just a reference to the modules setting as shown here:

var modulesConfiguration = controller.getSetting(“modules”);

The odd thing is that the struct appears empty in all the dumps before and after the loadModuleConfiguration() call, but if I run the dump immediately inside the configure() method for the ModuleConfig.cfc I see a populated struct, even though running the same dump right after the loadModuleConfigurat() call in ModuleService comes up with an empty struct again.

Somehow the struct is populated inside the loadModuleConfiguration() method, but in the ModuleService that is calling it, the struct appears empty both before and after the call.

I was wondering if this might have to do with some pass by refence / value issue or something, where modulesConfiguration is getting set to the value of controller.getSetting(“modules”), but when setting modulesConfiguration[modName] = mConfig, perhaps it’s not changing the actual setting, but instead maybe it’s just changing the values in the modulesConfiguration variable, which is only a copy of controller.getSettings(“modules”) and not a reference to it.

I’m not really sure, it’s very odd that it works locally but not remotely.

I get the same error on Railo 3.2.3.000 final running on CentOS 6

Message key [BLOGBOX] doesn't exist in struct (keys:)
Stacktrace The Error Occurred in
/webdata/platform.ch/vhosts/blogbox/htdocs/modules/blogbox-admin/
ModuleConfig.cfc: line 21

    19:
    20: // BLOGBOX MODULE LOCATION: CHANGE IF DIFFERENT FROM
CONVENTIONS
    21: var BB_PATH =
controller.getSetting("modules").blogbox.invocationPath;
    22:
    23: // Layout Settings

Ok, I think I fixed this, can you try again please.

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

works now, thanks alot!

found another typo:
modules/blogbox-ui/plugins/widgets/CommentForm.cfc

Line 40:
#getMyPlugin(plugin="Captcha",module="blogbox").display()#<br />
"Captcha" instead of "captcha"

Daniel

fixed!

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano