Skip to content

Conversation

@sgarnovsky
Copy link
Contributor

@sgarnovsky sgarnovsky commented Nov 12, 2024

Actually, a null reference exception occurs when a nested Editor.NameFor() or child component based on InputBase is used. The referenced bug issue has a sample to reproduce this problem.

The fix is a quite simple and probably doesn't require any test unit as an original issue looks like an indexing reference misprint.

It will fix #53956

This a fix for nested Editor<T> described in this issue: dotnet#53956
@sgarnovsky sgarnovsky requested a review from a team as a code owner November 12, 2024 06:41
@ghost ghost added the area-blazor Includes: Blazor, Razor Components label Nov 12, 2024
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Nov 12, 2024
@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Nov 21, 2024
@pavelsavara
Copy link
Member

this may need backports to 8 and 9

cc @javiercn

@MackinnonBuck MackinnonBuck assigned javiercn and unassigned halter73 Dec 19, 2024
@javiercn
Copy link
Member

/azp run aspnetcore-ci

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@javiercn javiercn added pending-merge PR is scheduled to get merged at a convenient time and removed pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun labels Jan 24, 2025
@javiercn javiercn merged commit 7de775d into dotnet:main Jan 28, 2025
27 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0-preview2 milestone Jan 28, 2025
captainsafia pushed a commit that referenced this pull request Feb 11, 2025
This a fix for nested Editor<T> described in this issue: #53956
@sgarnovsky
Copy link
Contributor Author

this may need backports to 8 and 9

cc @javiercn

I see a fix has been applied in the .Net 10 preview 2. It is very good.
Unfortunately, it is not in the .Net 8 or .Net 9 the latest SDK releases.
I just got a need to use nested Editor components but I can't migrate a production project to use the .Net 10 preview (it doesn't look as a safe option).

Is there any possibility to include this fix in one of the next release of .Net 8 and .Net 9?
Actually, it will be better to place it in both... to fix this minor issue to open Blazor forms for more flexible implementations in these versions too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-blazor Includes: Blazor, Razor Components community-contribution Indicates that the PR has been added by a community member pending-merge PR is scheduled to get merged at a convenient time

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nested Editor<T> crashing because of bug in HtmlFieldPrefix.Combine method

4 participants