Skip to content

docs(web/guides): add v4 Overriding Core Methods guide (#3343) - #3372

Merged
bpamiri merged 1 commit into
developfrom
docs/bot-3343-overriding-core-methods
Aug 5, 2026
Merged

docs(web/guides): add v4 Overriding Core Methods guide (#3343)#3372
bpamiri merged 1 commit into
developfrom
docs/bot-3343-overriding-core-methods

Conversation

@bpamiri

@bpamiri bpamiri commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

What / Why

The v4-0-0 guides tree had no "Overriding Core Methods" page — only the v3-0-0 page existed, and it over-promised the super<name> convention as general when it was model-only until the #3325 parity fix (PR #3357, merged 2026-08-04). This is the docs-only slice deferred from #3325.

Approach

Test evidence

  • Guides site builds clean: pnpm run build — 445 pages, no errors; new page rendered and present in sibling pages' sidebars.
  • verify-docs on the new page: 3 tagged blocks, 3 passed, 0 failed.
  • Full core suite (Lucee 7 + SQLite, local): 4758 pass / 0 fail / 0 error (docs-only change; suite run per repo policy).

Fixes #3343

🤖 Generated with Claude Code

Ports the v3-0-0 page into the v4-0-0 tree, corrected for 4.0.x: the
super<name> convention now applies to models AND controllers/view
helpers (parity landed with the #3325 fix, PR #3357). Documents
placement conventions (single controller, app/controllers/Controller.cfc,
app/views/helpers.cfm), the superLinkTo(argumentCollection=arguments)
delegation pattern pinned by SuperOverrideSpec.cfc, the dataConfirm
data-* pass-through alternative for the jsconfirm use case, and a
version callout with the CreateObject workaround for 4.0.x builds
predating the fix. Explicitly notes mapper internals are not an
override surface.

Registers the page in the v4-0-0 sidebar and section index, and adds a
version-scope note to the v3-0-0 page (model-only in 3.x).

Fixes #3343

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Peter Amiri <petera@pai.com>
@github-actions github-actions Bot added the docs label Aug 4, 2026

@wheels-bot wheels-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wheels Bot — Reviewer

TL;DR — This PR adds a v4 "Overriding Core Methods" guide documenting the super<name> convention for models, controllers, and view helpers, plus a version-scope note on the v3 page, a sidebar entry, and a LinkCard. The main content is accurate and well-anchored: the superLinkTo() / superFindAll() delegation, the "alias only created on a real override" behavior, and the model-vs-controller parity story all match vendor/wheels/tests/specs/controller/SuperOverrideSpec.cfc (whose own comments cite "exactly as the 'Overriding Core Methods' guide documents"). One block is a problem: the pre-fix workaround in the caution aside was never compile-verified and, as written, will not run. Verdict: request changes.

Correctness

overriding-core-methods.mdx:90-102 — the pre-fix workaround will throw at render time.

variables.coreLinkTo = CreateObject("component", "wheels.view.links").linkTo;
...
return coreLinkTo(argumentCollection = arguments);

wheels.view.links is declared component { with no extends (vendor/wheels/view/links.cfc:1), so a bare CreateObject instance holds only the methods physically declared in that file. But linkTo() immediately depends on framework methods that are not in links.cfc$args() (links.cfc:39), uRLFor() (:61), $routeVariables() (:70), and $element() (:72, defined in view/miscellaneous.cfc). Those only exist on a controller/view instance after $integrateComponents("wheels.view") mixes them in (Controller.cfc:5). A CFML method reference stays bound to its owning component, so coreLinkTo() executes against the bare links.cfc instance and throws at the first internal call ($args) before it ever reaches uRLFor.

This slipped through because the block is fenced as plain ```cfm (line 90) rather than ```cfm {test:compile} like the three verified examples (lines 38, 58, 115) — which is exactly why the PR's own evidence reads "3 tagged blocks, 3 passed": verify-docs never looked at this one.

Suggested fix: either (a) drop the broken snippet and point pre-fix users at the data-* pass-through you already document (it needs no override at all), or (b) replace it with an approach you've actually run on a pre-fix build and tag it {test:compile} so verify-docs covers it. A code sample presented as a working fallback must be executable.

Docs

Nice touches worth calling out (not blocking): the v3 page now carries an accurate version-scope note (v3-0-0/.../overriding-core-methods.md), the page is registered in both the sidebar (v4-0-0.json) and the Digging Deeper index LinkCard so it isn't orphaned, and the dataConfirm → data-confirm claim is correct against view/miscellaneous.cfc:481-489 (the Left(name,4) == "data"hyphenize() path, plus the data_ underscore branch).

Commits

docs(web/guides): add v4 Overriding Core Methods guide (#3343) — conforms to commitlint.config.js (type docs, scope web/guides, subject well under 100 chars). No issue.

Once the workaround block is fixed or removed (and ideally {test:compile}-tagged), this is good to merge.

@bpamiri
bpamiri merged commit c8d24f0 into develop Aug 5, 2026
14 checks passed
@bpamiri
bpamiri deleted the docs/bot-3343-overriding-core-methods branch August 5, 2026 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Override/enhance controller/view functions

1 participant