fix: repair Adobe CF compat-matrix failures (wave-4 templates, hardener specs, pagination params) - #3440
Merged
Merged
Conversation
…dobe CF
Template-scope function declarations throw 'routine declared twice' on Adobe
CF when an events template is included more than once per request (onrequestend
plus an in-process spec render). Adobe also ignores conditional script/tag
function declarations, so the helpers become guarded closure assignments —
the only probe-verified idempotent form.
- debug.cfm/cfmlerror.cfm/consoleeval.cfm/mcp.cfm/plugins.cfm/command.cfm:
convert 31 template helpers to guarded closures
- cfmlerror.cfm: untype the exception argument (Adobe rejects cfcatch
against struct-typed params)
- pagination.cfc: StructCount struct params before Len() (Adobe Len()
accepts only simple values)
- GlobalSurfaceIdentitySpec: derive the front controller path from the
resolved Global.cfc path (Adobe ExpandPath mangles '..' traversal)
- ControllerHardener{Should}Spec: reorder afterEach so a zero-arg
$helper call isn't followed by an argumented $helper call as the first
two closure statements (Adobe 2025 MissingNameException compile wipe)
- cfml-complexity.py: recognize guarded closure assignments as functions
- CLAUDE.md: document both Adobe traps (16b-ext)
Signed-off-by: Peter Amiri <peter@alurium.com>
Two post-Aug-23 regressions surfaced by the compat matrix (git bisect landed on #3399; the query-param break came in with #3419): - $queryParams: Adobe's IsNull() misreports dotted-path arguments holding the string 'Null' as null, so create()/save() bound SQL NULL for any 'Null'-valued property and NOT NULL columns rejected the insert (cascade failures in crudSpec ordering, updateAll, and transaction specs). Guard with IsSimpleValue() first — a real null is never a simple value, the string always is. - $isNewNestedCollectionKey: numeric keys above the signed 32-bit range (stale GetTickCount-style form markers) must count as new children so they never reach findByKey — Adobe's cfqueryparam throws 'Invalid data ... for CFSQLTYPE CF_SQL_INTEGER' where Lucee coerces silently. Verified locally: model area 993/0/0 on Adobe 2023 + MySQL and on Lucee 7 + MySQL; full Adobe 2023 + MySQL leg green apart from two macOS-only environment artifacts (bind-mount symlink delete, case- insensitive miscased-path resolution). Signed-off-by: Peter Amiri <peter@alurium.com>
…al runs Signed-off-by: Peter Amiri <peter@alurium.com>
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.
Summary
The Aug 28 compatibility-matrix dispatch on
developexposed a cluster of Adobe-CF-only failures that PR CI never sees (the matrix doesn't run on PRs):afterEachclosures whose first two statements are a zero-arg$-member call followed by an argumented$-member call — Adobe 2025's compiler throwsMissingNameException(attributed to the enclosingdescribe).struct-typedexceptionparam rejects Adobe's cfcatch.Len()on struct params throws on Adobe.ExpandPathmangles..traversal.Fixes
<cfif>; guarded closures are the only idempotent form)$paginationLinkToArgs: stringify struct params beforeLen()cfml-complexity.pyrecognizes guarded closures (gate stays green)Verification
Still investigating on this branch: the remaining Adobe+MySQL model-layer failures (crudSpec "saving null strings" + cascade, M2M8, OuterTransactionSignal) — git bisect is running against the Aug-23 matrix baseline.