You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On BoxLang, every call to engineAdapter.getStatusCode() (or anything that reaches the status code through Global.cfc::$getStatusCode()) throws:
Error getting method [getStatus] for class [ortus.boxlang.servlet.BoxPageContext]
This causes 600 test errors across 10 bundles × 5 databases in the latest compat-matrix run on develop — by far the single largest source of BoxLang errors. Fixing this alone reduces #2649's BoxLang error count from ~125/DB to ~25/DB.
public any function getResponse() {
return GetPageContext();
}
This override exists for getContentType()'s benefit (BoxLang reads Content-Type off the request, not the response, so the override lets getContentType() call local.response.getRequest().getHeader(...)).
public numeric function getStatusCode() {
return getResponse().getStatus();
}
On BoxLang that becomes GetPageContext().getStatus() — and ortus.boxlang.servlet.BoxPageContext does not expose a getStatus() method (only the wrapped HttpServletResponse does).
Suggested fix shape
Add a single getStatusCode() override to BoxLangAdapter.cfc that goes through the actual response object:
/**
* BoxLang's PageContext doesn't expose getStatus() directly.
* Reach the underlying HttpServletResponse to read it.
*/
public numeric function getStatusCode() {
return GetPageContext().getResponse().getStatus();
}
Adapter-pattern hazard worth flagging: overriding getResponse() in a subclass is a load-bearing change. Every Base.cfc method that calls getResponse() is now BoxLang-untested. A one-time audit (grep getResponse() Base.cfc) and an override-or-explicit-deletion decision for each caller would prevent the next bug of this shape. The current state is "one base method overridden, three base methods quietly broken."
Lucee/Adobe are unaffected — they don't override getResponse(), so Base.cfc::getStatusCode() resolves against their respective HttpServletResponse directly.
Describe the bug
On BoxLang, every call to
engineAdapter.getStatusCode()(or anything that reaches the status code throughGlobal.cfc::$getStatusCode()) throws:This causes 600 test errors across 10 bundles × 5 databases in the latest compat-matrix run on
develop— by far the single largest source of BoxLang errors. Fixing this alone reduces #2649's BoxLang error count from ~125/DB to ~25/DB.Evidence
Compat-matrix run #25837380625 (2026-05-13, develop). Bundles affected (count = occurrences across DBs):
wheels.tests.specs.controller.renderingSpecwheels.tests.specs.controller.csrf.cookieSpecwheels.tests.specs.controller.csrf.sessionSpecwheels.tests.specs.controller.sseSpecwheels.tests.specs.controller.miscellaneousSpecwheels.tests.specs.controller.verifiesSpecwheels.tests.specs.global.publicSpecwheels.tests.specs.controller.cachingSpecwheels.tests.specs.controller.redirectionSpecwheels.tests.specs.engineAdapterSpecAll on
cockroachdb,mysql,oracle,postgres,sqlite. (Lucee 6 / Adobe pass these specs cleanly.)To Reproduce
/wheels/core/tests?db=sqlite&format=json&directory=tests.specs.engineAdapterSpecon the BoxLang engine container.Engine Adapter :: returns a status code as numericerrors with the message above.Expected behavior
engineAdapter.getStatusCode()returns the current HTTP response status as a numeric (200 by default).Root cause
vendor/wheels/engineAdapters/BoxLang/BoxLangAdapter.cfc:18-20overridesgetResponse()to returnGetPageContext()directly:public any function getResponse() { return GetPageContext(); }This override exists for
getContentType()'s benefit (BoxLang reads Content-Type off the request, not the response, so the override letsgetContentType()calllocal.response.getRequest().getHeader(...)).But
Base.cfc:75-76then does:public numeric function getStatusCode() { return getResponse().getStatus(); }On BoxLang that becomes
GetPageContext().getStatus()— andortus.boxlang.servlet.BoxPageContextdoes not expose agetStatus()method (only the wrappedHttpServletResponsedoes).Suggested fix shape
Add a single
getStatusCode()override toBoxLangAdapter.cfcthat goes through the actual response object:/** * BoxLang's PageContext doesn't expose getStatus() directly. * Reach the underlying HttpServletResponse to read it. */ public numeric function getStatusCode() { return GetPageContext().getResponse().getStatus(); }5-line change. A failing-spec target already exists:
engineAdapterSpec :: returns a status code as numeric.Additional context
getResponse()in a subclass is a load-bearing change. Every Base.cfc method that callsgetResponse()is now BoxLang-untested. A one-time audit (grep getResponse() Base.cfc) and an override-or-explicit-deletion decision for each caller would prevent the next bug of this shape. The current state is "one base method overridden, three base methods quietly broken."getResponse(), soBase.cfc::getStatusCode()resolves against their respectiveHttpServletResponsedirectly.Related: #2649