COLDBOX-1452 Fix Bootstrap.cfc failing to compile on Adobe ColdFusion (appHash property default) - #703
Closed
homestar9 wants to merge 1 commit into
Closed
COLDBOX-1452 Fix Bootstrap.cfc failing to compile on Adobe ColdFusion (appHash property default)#703homestar9 wants to merge 1 commit into
homestar9 wants to merge 1 commit into
Conversation
Adobe ColdFusion only allows constant values as a property default. The appHash property used default="#getBaseTemplatePath()#", so Adobe refused to compile Bootstrap.cfc and every app failed on startup with "Expression in cfproperty value must have a constant value." Remove the property default and set appHash with a component-level param instead, next to the other params. The value still exists before reloadChecks() runs, which was the goal of the fix for ColdBox#668. Add a spec that creates a Bootstrap without calling loadColdBox(). The test suite starts ColdBox through VirtualApp, so no existing test ever compiled Bootstrap.cfc.
homestar9
marked this pull request as ready for review
September 23, 2026 19:54
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved blocking issues were identified, and regression coverage addresses the startup failure.
Review effort: Lite
Findings: None
What changed in this PR
Fixes Adobe ColdFusion startup failures by moving appHash initialization to component-level runtime code and adding regression coverage.
Changes:
- Removes the non-constant
appHashproperty default. - Initializes
appHashbefore reload checks. - Adds Bootstrap creation and hash initialization tests.
| File | Description |
|---|---|
tests/specs/BootstrapTest.cfc |
Adds regression coverage for Bootstrap creation and early hash availability. |
system/Bootstrap.cfc |
Adjusts appHash initialization for Adobe ColdFusion compatibility. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
ColdBox 8.2.0 fails to start on Adobe ColdFusion.
Bootstrap.cfcdoes not compile, and every app fails on its first request with:The cause is this line, added in d3963c4 ("Set default value for appHash property"):
Adobe ColdFusion only allows constant values, such as strings or numbers, as a
propertydefault. A function call is not allowed, so Adobe rejects the whole component. Lucee and BoxLang accept it.The fix
appHashproperty.appHashwith a component-levelparam, next to the other params:This keeps the goal of the fix for #668. The component-level code runs when the Bootstrap is created, so
appHashalready exists whenreloadChecks()uses it, even ifloadColdBox()has not run yet. The value is the same oneloadColdBox()sets, so its existing assignment still works unchanged.Why CI did not catch it
The test suite starts ColdBox through
coldbox.system.testing.VirtualApp, notBootstrap.cfc, so no test ever compiledBootstrap.cfc. The workflow does load/test-harness, which usesBootstrap.cfc, but thatcurlcall doesn't use--fail, so an error page there does not fail the job.Tests
Added
tests/specs/BootstrapTest.cfc. It creates aBootstrapwithout callingloadColdBox()and checks:getAppHash()already returns the expected hash. This covers the But on app hash param #668 case.Results on Adobe ColdFusion 2023.0.24.330957 (Java 17):
developmentwithout this fixI also reproduced the original startup error in a small ColdBox app on Adobe 2023.0.24, with both Java 17 and Java 21. With the fix, that app starts correctly in three cases: when
reloadChecks()runs beforeloadColdBox(), after a?fwreinit=1reload, and with the normalonApplicationStart()→loadColdbox()startup.I did not run the full suite locally, and I have not tested on Lucee or BoxLang. The fix only uses a plain
param, which those engines already support.Jira Issues
https://ortussolutions.atlassian.net/browse/COLDBOX-1452
Type of change
Checklist
Bootstrap.cfcalready had two unrelated lines that don't, and I left them alone)