Yoast / wordpress-seo

Yoast SEO for WordPress
https://yoast.com/wordpress/plugins/seo/
Other
1.77k stars 893 forks source link

Last Modified Time does not update on Attachment Page sitemap when noindex is bulk selected #8141

Open Pcosta88 opened 7 years ago

Pcosta88 commented 7 years ago

Please give us a description of what happened.

last modified time did not update when bulk noindex was selected for attachment pages

Please describe what you expected to happen and why.

Making an individual attachment page as noindex results in the attachment-page.xml sitemap to be updated. Therefore, I expected if bulk noindex they it would be updated as well

How can we reproduce this behavior?

1.Note last modified time for the attachment sitemap

screen shot 2017-10-24 at 1 42 05 pm

2.Mark an attachment page as noindex in advanced section of the Yoast Metabox

screen shot 2017-10-24 at 1 41 34 pm

3.See last modified time change

screen shot 2017-10-24 at 1 42 58 pm

4.Go back to attachment page and select it be "index". Save it.

Note: For these last steps, I waited a period of time before returning to it and during some other testing it last modified may have changed. But if you follow them below you will see the last modified does not change.

5.Review what the last modified time is (in this instance it shows 18:10

screen shot 2017-10-24 at 1 38 53 pm

6.Go to SEO->Titles and Metas->Post Types and select "noindex" for attachment pages

screen shot 2017-10-24 at 1 38 40 pm

7.See that last modified shows the same time

screen shot 2017-10-24 at 1 38 53 pm

Technical info

benvaassen commented 7 years ago

Related: https://github.com/Yoast/wordpress-seo/issues/7163

jdevalk commented 5 years ago

This is problematic technically, because of how we calculate that date, but it is indeed a bug and we should fix it. Technically if we change a post type to noindex that wasn't noindex before, we should update all those individual attachment posts to that date.