[CB4] modules....i'm missing something

36 views
Skip to first unread message

Krystar

unread,
Mar 18, 2015, 4:28:54 PM3/18/15
to col...@googlegroups.com
I'm trying to create a module and i can't get it to route over to the module handler instead of the main app handler.     cbdebugger shows i have the CBormHelper module loaded (among others like cborm) but when i click the link for entrypoint it goes to URL:  http://server/app/index_cb.cfm/CBormHelper  which i would expect to run CBormHelper's Main.index event.   but it's running the main app's Main.index event

debug info:
Current Event:
main.index
Current Layout:
Main.cfm (Module: )
Current View:
main/index
Current Route:
CBormHelper/
Routed URL:
CBormHelper/



directory structure:
  app/
    CONFIG
/
    HANDLERS
/
    LAYOUTS
/
    MODELS
/
    MODULES
/
     
CBormHelper/
       
ModuleConfig.cfc
        handlers
/
        models
/
    TESTS
/
    VIEWS
/
   
Application.cfc
  coldbox
/
  www
/

I have in my Application.cfc:
<!--- COLDBOX STATIC PROPERTY, DO NOT CHANGE UNLESS THIS IS NOT THE ROOT OF YOUR COLDBOX APP --->
<cfset COLDBOX_APP_ROOT_PATH = getDirectoryFromPath(getCurrentTemplatePath())>
<!--- The web server mapping to this application. Used for remote purposes or static purposes --->
<cfset COLDBOX_APP_MAPPING   = "app">
<!--- COLDBOX PROPERTIES --->
<cfset COLDBOX_CONFIG_FILE   = "app.CONFIG.Coldbox">
<!--- COLDBOX APPLICATION KEY OVERRIDE --->
<cfset COLDBOX_APP_KEY       = "">


in my CONFIG/Coldbox.cfc:
conventions = {
handlersLocation = "HANDLERS",
pluginsLocation  = "PLUGINS",
viewsLocation = "VIEWS",
layoutsLocation  = "LAYOUTS",
modelsLocation = "MODELS",
eventAction = "index",
modulesLocation  = "MODULES"
};


my app/MODULES/CBormHelper/ModuleConfig.cfc:
/**
*********************************************************************************
* Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp
********************************************************************************
*/
component {

  // Module Properties
  this.title        = "CBormHelper";
  this.author       = "";
  this.webURL       = "";
  this.description    = "make basic ORM model and handler stubs";
  this.version      = "0.1";
  // If true, looks for views in the parent first, if not found, then in the module. Else vice-versa
  this.viewParentLookup   = true;
  // If true, looks for layouts in the parent first, if not found, then in module. Else vice-versa
  this.layoutParentLookup = true;
  // Module Entry Point
  this.entryPoint     = "CBormHelper";
  // Model Namespace
  this.modelNamespace   = "CBormHelper";
  // CF Mapping
  this.cfmapping      = "CBormHelper";
  // Dependencies
  this.dependencies     = [ ];

  function configure(){
    // Custom Declared Points
    interceptorSettings = {
    };

    // Custom Declared Interceptors
    interceptors = [
    ];

  }

  /**
  * Fired when the module is registered and activated.
  */
  function onLoad(){
  }

  /**
  * Fired when the module is unregistered and unloaded
  */
  function onUnload(){

  }

}



Krystar

unread,
Mar 31, 2015, 12:04:44 PM3/31/15
to col...@googlegroups.com
anyone help?   need more info from me?

Brad Wood

unread,
Mar 31, 2015, 12:18:34 PM3/31/15
to col...@googlegroups.com
Do you know why the URL shows index_cb.cfm?  Also, do you happen to have a handler in the main app with the same name?  If you look at your browser debugging tools, is the request redirecting?  

~Brad
Reply all
Reply to author
Forward
0 new messages