Automattic / msm-sitemap

Comprehensive sitemaps for your WordPress VIP site. Joint collaboration between Metro.co.uk, WordPress VIP, Alley Interactive, Maker Media, 10up, and others.
74 stars 37 forks source link

msm_sitemap post permalink structure does not match permalink display URLs #170

Open benlk opened 1 year ago

benlk commented 1 year ago

There's a mismatch between the post URLs returned by WordPress and the URL where the sitemap is displayed:

$wp post list --post_type=msm_sitemap --fields=ID,url
+----------+--------------------------------------------+
| ID       | url                                        |
+----------+--------------------------------------------+
| 24806231 | http://example.test/?msm_sitemap=2022-11-11 |
| 24806222 | http://example.test/?msm_sitemap=2022-10-22 |
| 24806223 | http://example.test/?msm_sitemap=2022-10-14 |
...

These URLs don't match the URL where they're visible on the site, which is in the format /sitemap.xml?yyyy=2022&mm=11&&dd=11 or /sitemap-2022.xml?mm=11&dd=11

This mismatch may cause problems for automated tooling that interacts with the sitemap, such as a cache purger that purges the post's URL when a post is created or updated.