Skip to content

Commit ef70e59

Browse files
authored
fix(view): drop /wheels/* top nav in favor of debug footer (#2419)
The top navigation in _header.cfm duplicated links already provided by the debug bar emitted at onrequestend (System Info / Routes / API / Guides / Migrator / Packages / Plugins). Drop the nav include to eliminate the duplicate surface. Public.cfc handlers <cfinclude> their views directly without going through renderView, so request.wheels.showDebugInformation never flipped on /wheels/info, /wheels/routes, etc. — the bar wouldn't have appeared even after dropping the top nav. Opt into the bar from both _header.cfm and _header_simple.cfm so any view using either layout self-arms the debug footer. Extends the pattern from #2406 (welcome + error pages) to the rest of the dev-tools admin pages.
1 parent 5860ecd commit ef70e59

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

vendor/wheels/public/layout/_header.cfm

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ if (!IsDefined("pageHeader")) {
77
// Css Path
88
request.wheelsInternalAssetPath = application.wheels.webpath & "wheels/public/assets";
99
10+
// Opt the request into the dev debug bar emitted at onrequestend.
11+
// Public.cfc handlers <cfinclude> these views directly (bypassing
12+
// renderView, which is what normally flips this flag), so without this
13+
// the bar wouldn't appear on /wheels/info, /wheels/routes, etc. — which
14+
// is exactly where developers expect dev-tools nav. Setting it during
15+
// view rendering (here) instead of in the controller preamble avoids
16+
// touching request scope before the framework is fully wired.
17+
if (StructKeyExists(request, "wheels") && IsStruct(request.wheels)) {
18+
request.wheels.showDebugInformation = true;
19+
}
20+
1021
// Primary Navigation
1122
request.navigation = [
1223
{
@@ -440,12 +451,10 @@ if (StructKeyExists(url, "refresh")) {
440451
<body>
441452
<cfif request.isFluid>
442453
<div id="main" class="ui grid stackable h-100">
443-
<cfinclude template="_navigation.cfm">
444454
<div id="top" class="sixteen wide stretched column ">
445455
<div class="ui grid stackable">
446456
<cfelse>
447457
<div id="main">
448-
<cfinclude template="_navigation.cfm">
449458
<div id="top" class="margin-top">
450459
</cfif>
451460
<!--- cfformat-ignore-end --->

vendor/wheels/public/layout/_header_simple.cfm

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
<!---
22
Static simple version of the header/navigation for output on error screens
33
--->
4+
<cfscript>
5+
// Opt the request into the dev debug bar emitted at onrequestend.
6+
// Public.cfc::index() <cfinclude>s congratulations.cfm directly (bypassing
7+
// renderView, which is what normally flips this flag), so without this
8+
// the bar wouldn't appear on the welcome page when served from the
9+
// framework's Public dispatcher. Same opt-in pattern as _header.cfm.
10+
if (StructKeyExists(request, "wheels") && IsStruct(request.wheels)) {
11+
request.wheels.showDebugInformation = true;
12+
}
13+
</cfscript>
414
<cfoutput>
515
<!--- cfformat-ignore-start --->
616
<!DOCTYPE html>

0 commit comments

Comments
 (0)