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

Sitemap post not deleted when all posts deleted #63

Closed
Mobius5150 opened this issue Feb 11, 2014 · 1 comment
Closed

Sitemap post not deleted when all posts deleted #63

Mobius5150 opened this issue Feb 11, 2014 · 1 comment

Comments

@Mobius5150
Copy link
Contributor

When the last post on a given day is deleted the underlying post is not removed and may still contain the post data -- meaning it will be served if requested.

We should probably hook into the deleted_post action and check if this is the last sitemap for that day. If it is we can go ahead and delete the post (takes very little time). If it isn't then we should flag that post to be updated.

@nickdaugherty
Copy link
Member

This comes from this check in the cron and cli commands:

if ( Metro_Sitemap::date_range_has_posts( $date_stamp, $date_stamp ) ) {
    Metro_Sitemap::generate_sitemap_for_date( $date_stamp );
}

Needs #69 and #70 to be resolved.

mjangda added a commit that referenced this issue Mar 30, 2016
For both cron and CLI. Otherwise we end up with rougue empty sitemaps.

Fixes #63
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants