Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
6.2.X EE, 7.0.X, Master
-
7.0.x, 6.2.x
-
Committed
-
1.5
-
3
Description
The sitemaps generated by Liferay use the namespace "http://www.sitemaps.org/schemas/sitemap/0.9". The associated xsd file can be obtained at https://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd.
This xsd imposes an sequence order for the tags
- loc,
- lastmod,
- changefreq,
- priority.
Third-party services that validate the sitemap.xml against this xsd will issue an error if any of those tags are in the wrong order.
To see this error use the attached script in the Groovy console, using a valid url for the generated sitemap.xml (by going to localhost:8080/sitemap.xml and choosing the sitemap of a site).
Observed:
cvc-complex-type.2.4.a: Invalid content was found starting with element 'lastmod'. One of '{"http://www.sitemaps.org/schemas/sitemap/0.9":priority, WC[##other:"http://www.sitemaps.org/schemas/sitemap/0.9"]}' is expected.
Expected: The generated xml is valid against the xsd.
Attachments
Issue Links
- relates
-
LPE-16282 The sitemap.xml is generated with optional tags lastmod and changefreq in the wrong order
-
- Closed
-