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
{{ message }}
Repository navigation
super<name> originals are only registered for model overrides — controller/view helper overrides get no superLinkTo() #3325
Discussion #3323: a user followed the v3 guide Overriding Core Methods, overrode linkTo(), and called superLinkTo() — HTTP 500, because that function never exists in controller/view context.
Root cause
The super<name> convention is implemented asymmetrically:
vendor/wheels/Model.cfc → $integrateFunctions() (~line 598) — when the mixin method name already exists on the target (i.e. the app overrode it), the else branch registers the framework original as super<name>:
vendor/wheels/Controller.cfc → $integrateFunctions() (~line 400) — no else branch. super<name> is only registered when a registered plugin/package mixin overrides the name (overrideSet). App-level overrides of controller/view helpers (defined in app/controllers/Controller.cfc or app/views/helpers.cfm) silently get nothing.
vendor/wheels/Mapper.cfc has its own $integrateFunctions() variant (~line 403) — worth checking for the same gap while in there.
Repro (verified live on develop, Lucee)
In app/views/helpers.cfm define an override:
public string function linkTo() {
return superLinkTo(argumentCollection = arguments);
}
Render any view that calls linkTo() → error, superLinkTo is undefined.
StructKeyExists(variables, "superLinkTo") in the view returns false. The equivalent model-side override does get superFindAll() etc.
Proposed fix
Add the same else branch to Controller.cfc::$integrateFunctions() (and Mapper.cfc if applicable) so controller/view overrides get super<name> parity with models. ~5 lines + a spec.
Docs: the v3 guide presents the convention as general (it is model-only today), and the v4-0-0 guide tree has no "Overriding Core Methods" page at all — port + correct it once the parity fix lands.
Workaround for users today
Capture the original reference manually (late-binding — same trick $integrateFunctions itself uses); posted in #3323:
Activity
fix(controller): register super<name> for app-level controller and vi…
fix(controller): register super<name> for app-level controller and vi…
fix(controller): register super<name> for app-level controller and vi…
fix(controller): register super<name> for app-level controller and vi…
chore: ignore the runtime artifacts a local test run writes into the …
docs(web/guides): add v4 Overriding Core Methods guide (#3343) (#3372)
perf(model): inherit the model mixin surface instead of copying it pe…
fix: v4.1 regressions found in PMX/CounterPro upgrade (#3515–#3519) (#…