Skip to content
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

Issue with Non-Gregorian Dates in Sitemap Causing Errors in Google Search Console #16197

Closed
hamid-reza67 opened this issue May 30, 2024 · 7 comments

Comments

@hamid-reza67
Copy link

Hi everyone. There is a problem with the sitemap. When a non-Gregorian calendar is used (such as the Jalali or Hijri calendar), the lastmod date in the sitemap is also set to the non-Gregorian calendar, which causes an error in Google Search Console. Apparently, Google considers non-Gregorian dates to be invalid for sitemaps.
2024-05-30_11-17-19

2024-05-30_11-15-15

Copy link
Contributor

Thank you for submitting your first issue, awesome! 🚀 We're thrilled to receive your input. If you haven't completed the template yet, please take a moment to do so. This ensures that we fully understand your feature request or bug report. A core team member will review your issue and get back to you.

@Piedone
Copy link
Member

Piedone commented May 30, 2024

Please provide reproduction steps.

@hamid-reza67
Copy link
Author

  1. Change the culture to one that uses a non-Gregorian calendar (I changed it to fa-IR (Persian)).
  2. Republish one of the articles that is present in the sitemap.
  3. Now, check the details of that article in the sitemap.
    You will see that the lastmod field has a Jalali (non-Gregorian) date.

@Piedone
Copy link
Member

Piedone commented May 30, 2024

Thanks! So, it seems when generating the lastmod we need to force a specific format regardless of the culture, W3C Datetime format, see the docs.

Is this something you'd venture into contributing?

@Piedone Piedone added this to the 2.x milestone May 30, 2024
Copy link
Contributor

We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues).

This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here.

@gvkries
Copy link
Contributor

gvkries commented Jun 7, 2024

This does not occur on the main branch anymore. There have been several related fixes, e.g. recently #15229.

@hishamco hishamco closed this as completed Jun 7, 2024
@Piedone
Copy link
Member

Piedone commented Jun 7, 2024

Oh, great!

@MikeAlhayek MikeAlhayek modified the milestones: 2.x, 2.0 Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants