Frustration with customInterceptionPoints setting in a module

I didn't see this documented anywhere and it led to an afternoon of
ripping coldbox apart to figure out what was going on, so I thought I
would post about it.

If you have custom interception point defined in a module and you
register a interceptor in your parent application for that custom
interception point you will get the cryptic error:

Interceptor: {YourInteceptorName} not found in any state:

But there is a catch, if your interceptor handles any other
interception point other than custom module interception point you
wont get the error. That is because coldbox would have bound the
interceptor to the other interception point and in doing a deepSearch
it would rediscover the interceptor, but your custom module
interception point still will not run.

TL;DR; You have to declare all custom interception points in the
parent application or module that contains an interceptor for it.
Specifying a custom interception point in a module and having an
interceptor in your parent application for that point will cause an
error.

In this case the module settings will not "leech" to the parent
application.

.brett

Brett,

Thank you so much for this. That is why mine were not working either :slight_smile:

Anyways, I reworked the execution order of registration and activation. It will be part of 3.0 final and on github.

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Ha! I wasn't sure if it was a bug or a "feature" :slight_smile:

I updated to the latest but am getting a new error. Wirebox doesn't
seem to be hooking up my interceptor now (property injection). It is
a simple cfc with a handler for a custom interception point that gets
called after preEvent.

I don't have time to dig in now but hoping it is an easy find todo
with the latest changes. Rolling back to a previous version, we dont
have the issue. (but still have to declare our custom interception
points in both places)

Thanks Luis!

.brett

So the issue seems to be since the changes on march 25th interceptors
defined in modules are not getting autowired.

Brett, are you sure? Because from what I can see, NO module interceptors could EVER be wired because the autowire interceptor just looks at the main config and not the modules. So it seems like this never was there.

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Ok, this is fixed and ready for 3.0.

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Sweet. Confirmed the fix. Thanks.