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

Wrong last modified date time in sitemap index #7163

Open
benvaassen opened this issue May 26, 2017 · 16 comments
Open

Wrong last modified date time in sitemap index #7163

benvaassen opened this issue May 26, 2017 · 16 comments

Comments

@benvaassen
Copy link
Contributor

benvaassen commented May 26, 2017

What did you expect to happen?

That the last modified date in the sitemap would reflect the last modified date of the posts/pages in that specific sitemap (discussed with SEO team, also their expectation of the workings of the sitemap dates). No caching used.

What happened instead?

The dates are not always the same.

How can we reproduce this behavior?

  • Set the max entries per sitemap to something low, like 2-5
  • Check the last modified dates for the sitemap
  • Notice the inconsistencies with the last modified dates, like in the following images:

Sitemap:
xml_sitemap

Post-sitemap8:
xml_sitemap

Sitemap:
xml_sitemap

Post-sitemap15:
xml_sitemap

User example with 18.000 posts and sitemap set to max 500 entries:

Sitemap:
xml_sitemap

Post-sitemap7:
xml_sitemap

Technical info

  • WordPress version: 4.7.5
  • Yoast SEO version: 4.8
@benvaassen
Copy link
Contributor Author

Please inform the customer of conversation # 197055 when this conversation has been closed.

@Pcosta88
Copy link
Contributor

Pcosta88 commented Jul 4, 2017

Some further testing:

1.Edit a post within a category. In the example below, I edited the post on July 4th, 2017

7

2.The category sitemap (in this example the coupon-sitemap) changed to reflect the current last modified date of that updated post

8

3.The main sitemap did not. In fact, in some testing the coupon-sitemap changed while in others the store-sitemap changed

10

NOTES:
-Was not able to reproduce issue on my staging site with either WordPress' native category taxonomy set-up OR with a custom taxonomy such as the one's that can be created with a custom post type plugin.
-User has 1000 in the sitemap to be displayed
-User is updated with Yoast (4.9) but on WordPress 4.7.5
-User reported Back in Feb 2017, " It was working correctly up until around 3 months back from now." At that time user was on WordPress 4.7.2.
-User reports "This date issue DO NOT happen with normal pages on our site and they reflect correct date in the sitemap."

More Notes:
Last moddate in sitemaps may be ignored by Google: https://www.seroundtable.com/google-sitemap-priority-field-a-bag-of-noise-23645.html

@Pcosta88
Copy link
Contributor

Pcosta88 commented Jul 4, 2017

Please inform the customer of conversation # 180345 when this conversation has been closed.

@Pcosta88
Copy link
Contributor

Please inform the customer of conversation # 209099 when this conversation has been closed.

@mayada-ibrahim
Copy link

Please inform the customer of conversation # 415752 when this conversation has been closed.

@bcorke
Copy link

bcorke commented Aug 18, 2018

Taxonomy sitemap last mod date is missing in the sitemap on parent taxonomies that only have posts in it's child taxonomies.

Result is, in Google's new search console:

Index coverage: Indexed, not submitted in sitemap

Discovery:
Sitemaps: N/A

Is the above an issue?

  • If we manually add a post to the parent taxonomy, the sitemap now displays a lastmod date of the post as expected.
  • Outputting last mod date in a parent tax archive using get_the_modified_date( $d, $post ) with only posts in the child taxonomies, does seem to output the correct last mod date (of the latest post in any child taxonomy).
  • Seems we are struggling to be indexed quickly and not ranking so well on these parent taxonomies - (needs more investigation), whilst child taxonomies seem to be doing better.

The big issue for us is that posts are created via the API via a CRM. (jobPostings) and therefore it's not possible to add posts to the parent taxonomies as a quick fix.

Any help fixing this would be super appreciated!

Cheers,
Ben

@bpang
Copy link

bpang commented Oct 5, 2018

I see the same issue, but on my setup (WordPress 4.9.8 multisite, PHP 7.2.10) the first sitemap mod date never changes from its really old 2014 date no matter what I do. Updating a post within the first sitemap seems to move the post to the second sitemap and update the mod date for the second sitemap only.
yoast-sitemap-moddate-bug

@Pcosta88
Copy link
Contributor

Pcosta88 commented Jul 1, 2019

Issue is related to having multiple sitemaps.

1. Have multiple sitemaps for a content type like posts

Many Post sitemaps

1

Notice /daily-candy-feature/ Last Mod Time as it appears in the Post-sitemap1.xml
Screen Shot 2019-07-01 at 1 39 15 PM

2. Update the post
Screen Shot 2019-07-01 at 1 39 44 PM

3. See the most recent numerical sitemap gets the Last Mod updated but the one where the post was originally stayed the same

2

4. Visit post sitemaps and see the post was moved to the most recent one

Post-sitemap1.xml no longer has the post
Screen Shot 2019-07-01 at 1 49 38 PM

Post-sitemap4 does
Screen_Shot_2019-07-01_at_1_50_30_PM

Tech Specs
WordPress: 5.2.2
Yoast: v11.6 (free or prem)

@Pcosta88
Copy link
Contributor

Pcosta88 commented Jul 1, 2019

Please inform the customer of conversation # 519931 when this conversation has been closed.

@Mte90
Copy link

Mte90 commented Oct 13, 2022

I can confirm that this issue is still there.

Basically also using filter to change the numbers of max entries the problem persist. It is like that yoast cache those values and also on generating new sitemaps that existed before it used that date.
This happens only on the multiple files for the same post type.

@andytela
Copy link

andytela commented Nov 2, 2022

Having a similar issue
On a taxonomy page a when a post type is sent to draft, the modified date doesn't update
Because from what I believe is the way it works :

For the sitemap we try to fetch the last modified post date from a post within that taxonomy to let Google know there is a change on that page.

So because an older post is on there then it doesn't update the sitemap date so Google still has the old content in the description

So I have to update a post type that is in that taxonomy that is published so that it no longer has an old date

It needs to make sure that when a post is changed to draft then (or post_status changes) then it recognises that fact and updates accordingly

@amboutwe
Copy link
Member

Please inform the customer of conversation # 1037430 when this conversation has been closed.

@RitchelLauron
Copy link

Please inform the customer of conversation # 1120544 when this conversation has been closed.

@josevarghese
Copy link
Contributor

Related issue: #15801

@shabnam611
Copy link

Please inform the customer of conversation # 1144640 when this conversation has been closed.

@shabnam611
Copy link

Please inform the customer of conversation # 1147078 when this conversation has been closed.

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