-
-
Notifications
You must be signed in to change notification settings - Fork 107
Unclosed cfif tag error in AdminViewService #2005
Copy link
Copy link
Open
Labels
phase:1-stabilizeBugs, cleanup, CI fixes — tackle firstBugs, cleanup, CI fixes — tackle first
Description
Describe the bug
The CLI module fails to load due to a cfif tag parsing issue in AdminViewService. Error: tag [cfif] is not closed
This prevents the entire CLI module from loading.
To Reproduce
- Install Wheels CLI:
box install wheels-clior simply link latest CLI fromdevelopbranch tocommandBox - Run
box reloador start CommandBox - Observe the error during module loading
Expected behavior
The CLI module should load successfully without errors.
Desktop:
- OS: macOS
- Wheels Branch: Develop
Additional context
File: cli/src/models/AdminViewService.cfc:182
Problematic Code:
return "<cfif |ObjectNamePlural|." & field.name
& '><span class="badge bg-success">Yes</span>'
& '<cfelse><span class="badge bg-secondary">No</span></cfif>';Root Cause: The <cfif> tag contains embedded CFML tag syntax within a string being built with concatenation. Adobe CF parser sees <cfif as an actual tag rather than part of a string literal, causing it to report that the tag is not closed.
Suggested Fix: Use chr(60) to escape the < character:
return chr(60) & "cfif |ObjectNamePlural|." & field.name
& '><span class="badge bg-success">Yes</span>'
& chr(60) & "cfelse><span class="badge bg-secondary">No</span>" & chr(60) & "/cfif>";Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
phase:1-stabilizeBugs, cleanup, CI fixes — tackle firstBugs, cleanup, CI fixes — tackle first