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

XML Sitemap - Don't include content from trashed pages #1423

Closed
wpsmort opened this Issue Dec 20, 2017 · 1 comment

Comments

Projects
None yet
3 participants
@wpsmort
Member

wpsmort commented Dec 20, 2017

Reported by Karl Bratby by email.

When you have images attached to a page or post and the page/post is moved to the trash, the image attachment pages still exist. These image attachment pages can only be viewed when you're logged into the site. If you have Media / Attachments included in the XML Sitemap then these URLs get included in the sitemap which results in 404 errors when the sitemap is submitted to Google.

We should not include any content linked to trashed pages. If a URL has includes __trashed then we should exclude it from the sitemap.

An example can be found here - http://stevemortiboy.com/sitemap.xml. If you search this sitemap for the word trashed you will see five image attachment pages. These are images that were uploaded to a page but then the page was moved to trash. We shouldn't include those image attachment pages in the sitemap because the page they were attached to no longer exists.

@wpsmort wpsmort added the Enhancement label Dec 20, 2017

@contactashish13

This comment has been minimized.

Contributor

contactashish13 commented Dec 23, 2017

@contactashish13 contactashish13 added this to the 2.4.4 milestone Jan 3, 2018

@michaeltorbert michaeltorbert removed this from the 2.4.4 milestone Jan 4, 2018

contactashish13 added a commit to contactashish13/all-in-one-seo-pack that referenced this issue Jan 22, 2018

contactashish13 added a commit to contactashish13/all-in-one-seo-pack that referenced this issue Jan 26, 2018

contactashish13 added a commit to contactashish13/all-in-one-seo-pack that referenced this issue Feb 9, 2018

contactashish13 added a commit to contactashish13/all-in-one-seo-pack that referenced this issue Mar 17, 2018

@michaeltorbert michaeltorbert added this to the 2.7 milestone Mar 22, 2018

@wpsmort wpsmort modified the milestones: 2.7, 2.8 May 15, 2018

contactashish13 added a commit to contactashish13/all-in-one-seo-pack that referenced this issue Jul 27, 2018

@wpsmort wpsmort removed the Needs Testing label Aug 3, 2018

contactashish13 added a commit to contactashish13/all-in-one-seo-pack that referenced this issue Aug 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment