Skip to content

Treat null/missing CmpContext and IsMasterPage as equivalent in GetGxObject#1284

Merged
claudiamurialdo merged 1 commit into
masterfrom
fix/getgxobject-cmpcontext-nullempty-match
Jun 9, 2026
Merged

Treat null/missing CmpContext and IsMasterPage as equivalent in GetGxObject#1284
claudiamurialdo merged 1 commit into
masterfrom
fix/getgxobject-cmpcontext-nullempty-match

Conversation

@claudiamurialdo

Copy link
Copy Markdown
Collaborator

Make the comparison null-safe and treat 'missing/null/empty' as semantically equivalent to the default value:

  • CmpContext: a missing/empty entry matches a null-or-empty parameter.
  • IsMasterPage: a missing/empty entry matches IsMasterPage == false (default for bool). Comparison is case-insensitive against IsMasterPage.ToString().
    Issue:208727

@claudiamurialdo claudiamurialdo requested a review from dmendez May 26, 2026 13:13
@claudiamurialdo claudiamurialdo temporarily deployed to kafka-integration-tests May 26, 2026 13:13 — with GitHub Actions Inactive
@claudiamurialdo claudiamurialdo temporarily deployed to external-storage-tests May 26, 2026 13:13 — with GitHub Actions Inactive
@genexusbot

Copy link
Copy Markdown
Contributor
Cherry pick to beta success

…Object

HttpAjaxContext.GetGxObject(JArray, CmpContext, IsMasterPage) iterates the
array looking for an entry that matches the (CmpContext, IsMasterPage)
pair. The previous lookup called obj['CmpContext'].ToString() and
obj['IsMasterPage'].ToString() directly — when the array entry didn't
carry those keys, the indexer returned null and ToString() threw
NullReferenceException, which fell into the catch and made the function
return null, breaking the callers (ajax_rsp_assign_attri and similar).

Make the comparison null-safe and treat 'missing/null/empty' as
semantically equivalent to the default value:
- CmpContext: a missing/empty entry matches a null-or-empty parameter.
- IsMasterPage: a missing/empty entry matches IsMasterPage == false
  (default for bool). Comparison is case-insensitive against
  IsMasterPage.ToString().

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@claudiamurialdo claudiamurialdo force-pushed the fix/getgxobject-cmpcontext-nullempty-match branch from 87ef872 to 883f4bb Compare May 26, 2026 13:15
@claudiamurialdo claudiamurialdo temporarily deployed to external-storage-tests May 26, 2026 13:15 — with GitHub Actions Inactive
@claudiamurialdo claudiamurialdo temporarily deployed to kafka-integration-tests May 26, 2026 13:15 — with GitHub Actions Inactive
@genexusbot

Copy link
Copy Markdown
Contributor
Cherry pick to beta failed, 1 conflicted file in commit 883f4bb
  • dotnet/src/dotnetframework/GxClasses/Core/Web/HttpAjaxContext.cs

@genexusbot genexusbot added the conflict Conflict merging to beta branch label May 26, 2026
@genexusbot

Copy link
Copy Markdown
Contributor
Manual cherry pick to beta success

@genexusbot genexusbot removed the conflict Conflict merging to beta branch label May 26, 2026
@claudiamurialdo claudiamurialdo merged commit e75ad7b into master Jun 9, 2026
17 of 18 checks passed
@claudiamurialdo claudiamurialdo deleted the fix/getgxobject-cmpcontext-nullempty-match branch June 9, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants