404 links not updating doms
Unanswered
Capelin posted this in #help-forum
CapelinOP
If I have a 404 page.
And then have a basic next/link inside the navbar, the href is updating when clicking the link. But the page is not rerendered.
I have ran into several issues with the next error page in the past. Is there any way to make our own error pages?
"use client";
import React from "react";
import Navbar from "@/_components/_nav/Navbar";
function Page() {
return (
<>
<Navbar />
<div className="text-center">
<h1 className="text-4xl font-bold">404</h1>
<p className="text-lg mt-4">Page was not found.</p>
</div>
</>
);
}
export default Page;And then have a basic next/link inside the navbar, the href is updating when clicking the link. But the page is not rerendered.
I have ran into several issues with the next error page in the past. Is there any way to make our own error pages?
7 Replies
Shy Albatross
Same issue here, I have a Home link in navbar at the top, which shows on the deafult not-found page because it's in root layout. When I go to a page that doesn't exist and I get put on the 404 page, clicking the Home link changes the URL in the address bar, but doesn't actually navigate anywhere.
At the same time, while you're on the error page, clicking a different link in the top bar, that takes you to some page (not "/") works, and then the "/" link works again from that page.
so
"/" -> "/foobar" 404 -> "/" doesn't work"/" -> "/foobar" 404 -> "/sign-in" -> "/" worksI have the same issue as well but it works for authenticated users. If the user is unauthenticated, then it won't work and ClientSideError appears.
CapelinOP
This is super annoying, any solutions?
@Jenn Curious, mine has the same behavior.
Are you using the middleware to redirect users if unauthorized?
@Jenn Curious, mine has the same behavior.
Are you using the middleware to redirect users if unauthorized?
Shy Albatross
There are issues on GH reported for this. The word I got from Vercel is that v13 navigation and routing issues are back on the menu after the v14 release. This includes broken Links on error pages as well as issues with intercepting and/or parallel routes.
@Capelin This is super annoying, any solutions?
<@914499424443564062> Curious, mine has the same behavior.
Are you using the middleware to redirect users if unauthorized?
yes, I do have a middleware. And for now, I just did not put any links for my 404 page