Hey folks,
I’m working on a new module and am having an issue with SES route execution.
My module name is ‘products’ and I generated it using the ColdBox Builder extension. I have also added the following to my host application routes:
addModuleRoutes(pattern=“products”,module=“products”);
All is good and I can access the module entry point by:
http://local.myapp.com/products:home/index
or
http://local.myapp.com/products
In my Home.cfc handler I have two functions - index() and add(). Both of these execute when I access like so:
http://local.myapp.com/products:home/index
http://local.myapp.com/products:home/add
According to the SES Default Route execution docs on the wiki - http://wiki.coldbox.org/wiki/Modules.cfm I should be able to access the add() method by:
http://local.myapp.com/products/add
however, this fires just takes me to the index function and I see the following the tracer log:
Invalid Module Event Called: products:add.index. The module: products is not valid. Valid Modules are: partners,products
This is what I have for route definitions within my ModuleConfig.cfc
routes = [
// Module Entry Point
{pattern="/", handler=“Home”,action=“index”},
// Convention Routes
{pattern="/:handler/:action?"}
];
Any idea why I can’t resolve /products/add/ ? The docs indicate that this should work.
Thanks.
Nolan