Issue with routes and invalid registered event

I am just getting started with ColdBox, trying to use a custom route
with an event handler. My config/routes.cfm looks like this:

<cfset addCourse(pattern="/people/:person_id", handler="users",
action="show")>
<cfset addCourse(":handler/:action?/:id?")>

(yes, making sure to put my custom route above the catch-all one)

I have a "handlers/users.cfc" with a "show" function.

So when I request a path such as "/index.cfm/people/23" I get this
error:

The event handler: people.23 is not valid registered event.

I would think that it would work just fine and the requestContext
object would allow me to access the "person_id" variable.

What am I missing?

I do have the proper interceptor enabled in coldspring.xml.cfm

<Interceptor class="coldbox.system.interceptors.ses">
  <Property name="configFile">config/routes.cfm</Property>
</Interceptor>

Thanks in advance.

I just answered my own question: it turns out that in my routes.cfm
file in the pattern I started it with a leading slash
("/people/:person_id") and that was causing this error to happen. If I
remove the leading slash, all is well.

Hmm, that was a subtle one, maybe put this in the documentation?

Yea, that seems weird.

I will check it and make a note of it.

Luis,

Just double checked this behavior.

http://www.abc.com/help ROUTE "/help" does not work if there any
forward slash before route-string

Thanks
Sana

Yea, that seemed strange. Anyways, I have logged a bug for it to do pre route cleanup of the “/”.