Skip to content

Commit 88e3dc0

Browse files
committed
COLDBOX-1327 #resolved
`layoutLocations` variable error when using event.noLayout()
1 parent 574f6a0 commit 88e3dc0

File tree

4 files changed

+37
-11
lines changed

4 files changed

+37
-11
lines changed

box.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@
6262
"format:watch":"cfformat watch system/**/*.cfc,tests/specs/**/*.cfc ./.cfformat.json",
6363
"format:check":"cfformat check system/**/*.cfc,tests/specs/**/*.cfc ./.cfformat.json",
6464
"start:lucee":"server start serverConfigFile='server-lucee@5.json' --force",
65-
"start:boxlang":"server start serverConfigFile='server-boxlang@1.json' --force",
65+
"start:boxlang":"server start serverConfigFile='server-boxlang-cfml@1.json' --force",
6666
"start:2023":"server start serverConfigFile='server-adobe@2023.json' --force",
6767
"stop:lucee":"server stop serverConfigFile='server-lucee@5.json' --force",
68-
"stop:boxlang":"server stop serverConfigFile='server-boxlang@1.json' --force",
68+
"stop:boxlang":"server stop serverConfigFile='server-boxlang-cfml@1.json' --force",
6969
"stop:2023":"server stop serverConfigFile='server-adobe@2023.json' --force",
7070
"log:lucee":"server log coldbox-lucee@5 --follow",
71-
"log:boxlang":"server log coldbox-boxlang@1 --follow",
71+
"log:boxlang":"server log coldbox-boxlang-cfml@1 --follow",
7272
"log:2023":"server log coldbox-adobe@2023 --follow"
7373
},
7474
"installPaths":{

system/web/Renderer.cfc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -605,19 +605,19 @@ component
605605
}
606606
}
607607

608+
// Discover the layout location + helpers
609+
var layoutLocations = discoverViewPaths(
610+
view : cbox_currentLayout,
611+
module : arguments.module,
612+
explicitModule: cbox_explicitModule,
613+
isLayout : true
614+
);
615+
608616
// If Layout is blank, then just delegate to the view
609617
// No layout rendering.
610618
if ( len( cbox_currentLayout ) eq 0 ) {
611619
iData.renderedLayout = this.view();
612620
} else {
613-
// Discover the layout location + helpers
614-
var layoutLocations = discoverViewPaths(
615-
view : cbox_currentLayout,
616-
module : arguments.module,
617-
explicitModule: cbox_explicitModule,
618-
isLayout : true
619-
);
620-
621621
// Render the layout with it's helpers
622622
iData.renderedLayout = renderViewComposite(
623623
view : cbox_currentLayout,

test-harness/handlers/nolayout.cfc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
component{
2+
3+
function preHandler( event, rc, prc ) {
4+
event.noLayout();
5+
}
6+
7+
function login( event, rc, prc ) {
8+
event.setView( "nolayout/login" );
9+
}
10+
11+
}

test-harness/views/nolayout/login.cfm

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<cfoutput>
2+
<form action="/login" method="post">
3+
<label for="username">Username:</label>
4+
<input type="text" id="username" name="username" required>
5+
6+
<p>&nbsp;</p>
7+
8+
<label for="password">Password:</label>
9+
<input type="password" id="password" name="password" required>
10+
11+
<p>&nbsp;</p>
12+
13+
<button type="submit">Login</button>
14+
</form>
15+
</cfoutput>

0 commit comments

Comments
 (0)