Building first Module - Routing Issue

Hi guys,

I’ve been working on taking an existing Coldbox app and converting into a module. I’ve been able to get the basic loading and config working however i’m having issues getting the routing to work.

Here is my setup.

In the host application I’ve added the following moduleRoute:


When someone comes to the site they will hit a URL like:

In my module config I have this route:


For reference (and not sure if it’s useful to this question) my module entry point is: this.entryPoint = “connect:home.index”;

Now…the routing appears to work and it hits the Login action…

function login(event){
var rc = event.getCollection();
//Delete login Information


However, when it tries to render the view it redirects to my invalid event handler. If I uncomment the dump it also only displays :id1

I’m at a bit of a loss here to determine what is messed up. Hoping someone can point me in the right direction.

Thanks all!



I see the same issue as you I think. I setup a module but can’t seem to have ColdBox respect the SES route convention of “:handler/:action?” within the module. This route, however, works: {pattern=":action",handler=“myHandler”}.

Perhaps one of the other module wizards knows what config error I may have made? I’ve looked at the source for the public modules and everyone seems to be using explicit URLs like “relax:home.index”.


Aaron Greenlee

The default handler/action is for the parent. A module needs to define one if it wanta to use it in the module.

Thanks Aaron, I was able to get the module working by adding {pattern=":action",handler=“myHandler”} to my module routes.

I’m now getting random errors occurring that I think may have something to do with using SES routes and modules. The first one is…

Framework Initialization/Configuration ExceptionError Type: Expression : [N/A]

Error Messages: Cannot access array element at position 3.
The array has 1 indexes. Valid positions are from 1 to 1.

Tag Context:
LINE: 481
Template: /Library/WebServer/Documents/guardly-platform/common/frameworks/coldbox/system/interceptors/SES.cfc
LINE: 399
Template: /Library/WebServer/Documents/guardly-platform/common/frameworks/coldbox/system/web/services/ModuleService.cfc

And the second one is:

Framework Initialization/Configuration ExceptionError Type: SES.InvalidModuleName : [N/A]

Error Messages: Error loading module routes as the module requested ‘connect’ is not loaded.
The loaded modules are:

Tag Context:
LINE: 413
Template: /Library/WebServer/Documents/guardly-platform/common/frameworks/coldbox/system/FrameworkSupertype.cfc
LINE: 179
Template: /Library/WebServer/Documents/guardly-platform/common/frameworks/coldbox/system/interceptors/SES.cfc

The weird thing is that when these errors occur when i’m not even accessing the module. i’m in a completely separate part of the app.

Does anyone have any idea what might be going on?



Ate you using 3.1 or nightly? Also are you using autoreload for modules

Hi Luis,

I’m using 3.1 and modules auto reload is set to true (in development environment)



Ahh ok I think mike mckellip reported this and contributed a fix and it is in the development branch. It deals with the autoreload flag. I would recommend either turn it off or update to development.