You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using PrismicNextLink with basePath throws the following hydration error:
Warning: Prop `href` did not match. Server: "/article/my-article" Client: "/home/article/my-article/"
Resulting in an issue where the link can be wrong displayed.
Looking into the issue, I copied the exact PrismicNextLink file from here and tried with that.
Removing the forwarded ref resolved the issue for basePath and the / at the end.
Versions
@prismicio/next: v1.5.0
next: v14.1.4
node: v20.11.1
Steps to reproduce
Create a clean Next.js Pages router project
Set up some basic routing with the routes in createClient.
Add a basePath to next.config.mjs
Check console.
What is expected?
The error should not be thrown with or without basePath.
What is actually happening?
An error is thrown, and the path is sometimes incorrect.
The text was updated successfully, but these errors were encountered:
This issue has been labeled as a bug since it was created using the 🚨 Bug Report Template.
Hi there, thank you so much for the report!
Following our Maintenance Process, we will review your bug report and get back to you next Wednesday. To ensure a smooth review of your issue and avoid unnecessary delays, please make sure your issue includes the following:
Information about your environment and packages you use (Node.js version, package names and their versions, etc.) Feel free to attach a copy of your package.json file.
Any troubleshooting steps you already went through
A minimal reproduction of the issue, and/or instructions on how to reproduce it
If you have identified the cause of the bug described in your report and know how to fix it, you're more than welcome to open a pull request address it. Check out our quick start guide for a simple contribution process.
If you think your issue is a question (not a bug) and would like quicker support, please close this issue and forward it to an appropriate section on our community forum: https://community.prismic.io
Using
PrismicNextLink
withbasePath
throws the following hydration error:Resulting in an issue where the link can be wrong displayed.
Looking into the issue, I copied the exact
PrismicNextLink
file from here and tried with that.Removing the forwarded ref resolved the issue for
basePath
and the/
at the end.Versions
@prismicio/next
: v1.5.0next
: v14.1.4Steps to reproduce
createClient
.basePath
tonext.config.mjs
What is expected?
The error should not be thrown with or without
basePath
.What is actually happening?
An error is thrown, and the path is sometimes incorrect.
The text was updated successfully, but these errors were encountered: