OrchardCMS / OrchardCore

Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
https://orchardcore.net
BSD 3-Clause "New" or "Revised" License
7.35k stars 2.37k forks source link

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

Closed hamid-reza67 closed 3 months ago

hamid-reza67 commented 3 months ago

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

github-actions[bot] commented 3 months ago

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 commented 3 months ago

Please provide reproduction steps.

hamid-reza67 commented 3 months ago
  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 commented 3 months ago

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?

github-actions[bot] commented 3 months ago

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 commented 3 months ago

This does not occur on the main branch anymore. There have been several related fixes, e.g. recently https://github.com/OrchardCMS/OrchardCore/pull/15229.

Piedone commented 3 months ago

Oh, great!