-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sitemap is being generated incorrectly and an error in development also appears when I try to access /sitemap.xml #66363
Comments
I changed my multiform-validator page to work with ssr, in development mode the error no longer appears, in production a completely wrong sitemap is still generated. Now I still have a page with the same error that can be put in place for this issue, where the error occurs in dev mode AND in the generation of the sitemap the new page below: https://gabriellogan.ddns.net/sitemap.xml https://github.com/gabriel-logan/gabriel-logan/blob/main/docs/src/app/sitemap.ts And the multiform-validator is running as ssr and the sitemap is still generated incorrectly: https://multiformvalidator.vercel.app/sitemap.xml |
+1 Exactly the same issue (I've tried with different versions of NextJS but same result) |
This comment has been minimized.
This comment has been minimized.
Yes, still not solved |
The sitemap works. You need to go to your sitemap at localhost:3000/sitemap.xml, right-click to save the page, and open it in a text editor. Alternatively, you can check it in your browser’s console. |
Why is it just texts like in my example and those of my friends above? |
It’s just text in the browser because web browsers do not necessarily handle XML correctly, but you can test it with sitemap validators available online. |
So do you ensure that there will be no problem with search systems like google search etc? |
You can check if the sitemap is valid using the Google console or with a site like this : https://www.xml-sitemaps.com/validate-xml-sitemap.html |
@thibault-chausson Can you provide root cause of issue? Problem
Requirements
Example with alternate
|
Link to the code that reproduces this issue
https://github.com/gabriel-logan/multiform-validator/blob/main/docs/src/app/NOTWORKING_sitemap_copy.ts
https://github.com/gabriel-logan/gabriel-logan/blob/main/docs/src/app/sitemap.ts
To Reproduce
As I said, in development mode, the sitemap gives the following error when I try to access the MY_URL/sitemap.xml route:
And the second problem is that in the production version where the sitemap is generated, it is being generated incorrectly, when I had few routes registered there, it generated ok, but now that there are a lot of routes it is getting buggy.
Showing the print below
https://multiform-validator.3utilities.com/sitemap.xml
Current vs. Expected behavior
I was hoping to be able to access it via /sitemap.xml because I'm not using dynamic routes and on my production site I was expecting it to be correct and it's being wrong.
Provide environment information
Which area(s) are affected? (Select all that apply)
Not sure, Developer Experience, Metadata, Output (export/standalone)
Which stage(s) are affected? (Select all that apply)
next dev (local), Other (Deployed)
Additional context
I looked for my case in several places and couldn't find it.
The text was updated successfully, but these errors were encountered: