Skip to content

Commit a24b5d7

Browse files
committed
COLDBOX-1367 #resolve
Router not being detected correctly on modern/boxlang app layouts due to missing app mapping not used
1 parent 41e3fd4 commit a24b5d7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

system/web/services/RoutingService.cfc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,19 @@ component extends="coldbox.system.web.services.BaseService" accessors="true" {
9090
// Declare types of routers to discover
9191
var modernRouter = "config.Router";
9292
var baseRouter = "coldbox.system.web.routing.Router";
93+
var appMapping = ( len( variables.appMapping ) ? "/#variables.appMapping#/" : "/" );
9394

9495
// Discover router: app or base
95-
var configFilePath = variables.routingAppMapping & modernRouter.replace( ".", "/", "all" );
96+
var configFilePath = appMapping & modernRouter.replace( ".", "/", "all" );
9697
var routerType = (
9798
fileExists( expandPath( configFilePath & ".cfc" ) ) || fileExists(
9899
expandPath( configFilePath & ".bx" )
99100
)
100101
) ? "modern" : "base";
101102

103+
writeDump( var=configFilePath, top = 5, showUDFs = false );
104+
writeDump( var=routerType, top = 5, showUDFs = false );
105+
102106
// Check if base router mapped?
103107
if ( NOT wirebox.getBinder().mappingExists( baseRouter ) ) {
104108
// feed the base class

0 commit comments

Comments
 (0)