RE: [coldbox:15513] [Coldbox - 3.5] The event is not valid registered event

Hmm, I’m not quite sure. I noticed your handler component doesn’t extend “coldbox.system.eventhandler” but you say it’s working on your local environment so I’m confused. It seems like it would have to be a configuration issue.

Also, the CF mappings are not a requirement. If you have no CF mapping called “coldbox”, then simply placing the coldbox folder in your web root will work. However, seeing as how your environments use different folder structures, it might be handy for you to set app-specific mappings. You can make them dynamic (relative) based on where the app is deployed.

Something to the effect of this in your application.cfc should get you started:

this.mappings[’/coldbox’] = getDirectoryFromPath(getCurrentTemplatePath()) & ‘coldbox’;

Also, a couple unrelated notes on your code-- Since you’re on ColdBox 3.5, your actions get event, rc, and prc passed into the arguments. That means the var rc = event.getCollection();
bit isn’t required any more in your handler methods. You can access rc directly. (It resolves to the arguments scope)

Also, I would recommend looking into environment overrides in your config. You can have ColdBox automatically sniff out what environment you’re on with some regex, and then override settings appropriately. That means your big if statement trying to figure out what web service URL to use could go away in favor of getSetting(“currentWebserviceURL”) which would pull the appropriate one based your config’s environment overrides.



ColdBox Platform Evangelist
Ortus Solutions, Corp

ColdBox Platform: