Open
Description
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 notundefined
when we enterperformEnhancedPageLoad
.
To do it, take #62524 and separate connected changes into a PR.