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

Oh, something else to look at is the appMapping setting. This is auto-calculated by ColdBox. It looks like it should be “myapp/” on local and “” on dev. You’ll probably have issues with your base URL as well if it doesn’t that that into account.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Hi Brad,

Both environments are windows. Also, I know that Coldbox isn’t in the Webroot, but it is in the same root of the folder where the application is stored, and I believe we are using server-level mapping but am not positive.
I’ll try setting the appMapping setitng.

Here is the code for the home.cfc handler, we use a web service to get the data:

component output=“false”{

property name=“remoteProxy” inject=“coldbox:myPlugin:remoteProxy”;

this.event_cache_suffix = “”;
this.prehandler_only = “”;
this.prehandler_except = “”;
this.posthandler_only = “”;
this.posthandler_except = “”;
this.aroundHandler_only = “”;
this.aroundHandler_except = “”;
/* HTTP Methods Allowed for actions. /
/
Ex: this.allowedMethods = {delete=‘POST,DELETE’,index=‘GET’} */
this.allowedMethods = structnew();

public function index(event){
var rc = event.getCollection();

rc.layout = event.getValue(“layout”, “main”);

if(rc.layout eq “channel”){
event.setLayout(“Layout.Channel”);
}

event.setView(“home/index”);
}

public function lookup(event){
var rc = event.getCollection();

rc.id = event.getValue(“id”, “”);
rc.index = event.getValue(“index”, “1”);
rc.netid = event.getValue(“netid”, “1”);

if(getSetting(“env”) eq “local”){
var rc.address = remoteProxy.get(“http://localhost:8500/ws/index.cfm/person/Address”, {id=rc.ndid,index=rc.index, netid=rc.netid }, true);
}
else if(getSetting(“env”) eq “dev”){
var rc.address = remoteProxy.get("http://ws-dev.com/ ", {id=rc.id,index=rc.index, netid=rc.netid }, true);
}
else if(getSetting(“env”) eq “test”){
//TODO
//var rc.address = remoteProxy.get(“http://localhost:8500/ws/index.cfm/person/Address”, {id=rc.id,index=rc.index, netid=rc.netid }, true);
}
else{
//TODO
//var rc.address = remoteProxy.get(“http://localhost:8500/ws/index.cfm/person/Address”, {id=rc.id,index=rc.index, netid=rc.netid }, true);
}
event.renderData(“text”, rc.address.response);
//event.renderData(“text”, rc.address.request);

}

}