Open modulareverything opened 1 year ago
@modulareverything Im getting this same bug, I can see the canonical url in the code but am getting the same error in Sanity. Were you able to resolve it?
I don't think I ever actually fixed this to be honest, and just ended up not using this plugin as it was just for a test. Sorry it's not very helpful.
@modulareverything - Is localhost:3000 your development port. I had the same error with a Gatsby project on localhost:8000. Ran a local production build on localhost:9000 and used this as the production url for the options.url for Seo-pane. Allowed me to get beyond this.
@eddiewilson I made sure when I tried it that I pointed it a production url of the site, rather than locally. Its strange.
In my case the reason no canonical data was found when pointing to localhost rather than production was that the page was not pre-rendered and the response from the preview URL was in javascript rather than a HTML string response. This is discussed here: https://www.sanity.io/plugins/seo-pane#rendering-preview-content-server-side You'll need to update your preview query to return HTML.
Hey, in my
layout.jsx
file I'm setting the canonical URL like so:I can see this is adding correctly into the head on my code, but when testing the SEO plugin locally (http://localhost:3000/admin for me), I get
Error: No canonical URL found
Is this a bug or am I doing something wrong?