Skip to content

Fix NotFoundSetOnFormSubmit_ResponseNotStarted_SSR test #62540

Open
@ilonatommy

Description

@ilonatommy

NotFoundSetOnFormSubmit_ResponseNotStarted_SSR should use "post-not-found-ssr" url, not "post-not-found-ssr-streaming". After fixing this test, we uncovered an issue with fetching 404 page by the client.

It turns out that in the cases when the NotFound was called synchronously, it was reaching the enhanced navigation code on client earlier than initialization of enhanced navigation in boot function. To fix this we did 2 things:

  • moved enhanced nav initialization as early as possible in boot (just a cosmetic change),
  • changed navigationEnhancementCallbacks to a promise, so that we make sure it's not undefined when we enter performEnhancedPageLoad.

To do it, take #62524 and separate connected changes into a PR.

Metadata

Metadata

Assignees

Labels

area-blazorIncludes: Blazor, Razor Components

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions