Custom plugin is not loading

This is probably something basic, but I am not seeing it right now. The idea is to overload the core ResourceBundle.cfc plugin so that I can load the resourece bundles from a databaes instead of a properties file.

My application directory structure looks like this …

\webapp
\coldbox
\config
\Coldbox.cfc
\plugins
\ResourceBundle.cfc
\www

Basically, I have moved everything that should not be directly web accessible above the web root (www). I have added the convention settings to my Coldbox.cfc file for the views, layouts, models, plugins, etc. The settings are working as handlers, views, layouts, etc. are all working. The pluginsExternalLocation setting = “webapp.plugins”.

In the stack trace, I can see the core ColdBox ResourceBundle.cfc being called. However, my custom overloaded plugin never gets called. Any ideas what I am missing here?

Thanks!

I have no idea how it works now, but back in 2.x you had to call myCustomPlugin() instead of plugin(). Perhaps it’s the same now? (I might have the method names slightly out of whack. Going completely from memory from several years back.)

HTH

Okay, maybe this is not so basic. To test out the plugin, I dropped the following code into one of my handlers.

<cfset var temp = getMyPlugin( “ResourceBundle” ) />

The output showed the custom ResourceBundle plugin. So, it does not appear to be an issue of ColdBox finding the custom plugin. The issue appears to be that it is not loading the custom plugin based upon my i18n configuration in the ColdBox CFC. Is there something else that needs to be done to override the ResourceBundle.cfc in the default i18n configuration?

Thanks!

You need to use the setting ColdBox extensions location. This location will be scanned first instead of the core plugins.

So the valu for it should be “webapp”. This will find the plugins folder inside of webapp and look for core plugins there first

Luis Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano

Luis,

That was the missing piece to the puzzle … thanks!

– Jeff