Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#50607 closed defect (bug) (fixed)

Filter non-publicly_queryable from the sitemap

Reported by: cybr's profile Cybr Owned by: swissspidy's profile swissspidy
Milestone: 5.5 Priority: normal
Severity: normal Version: 5.5
Component: Sitemaps Keywords: has-patch has-unit-tests commit
Focuses: Cc:

Description

When a post type or taxonomy has its publicly_queryable parameter set to false, the post type's posts or taxonomy's terms are no longer visible, even when they're public.

The attached patch filters those post types and taxonomies from the sitemap.

Attachments (2)

providers.patch (1.2 KB) - added by Cybr 4 years ago.
50607.diff (7.0 KB) - added by swissspidy 4 years ago.

Download all attachments as: .zip

Change History (8)

@Cybr
4 years ago

This ticket was mentioned in Slack in #core-sitemaps by cybr. View the logs.


4 years ago

#2 @SergeyBiryukov
4 years ago

  • Milestone changed from Awaiting Review to 5.5

#3 @swissspidy
4 years ago

  • Owner set to swissspidy
  • Status changed from new to reviewing

@swissspidy
4 years ago

#4 @swissspidy
4 years ago

  • Keywords has-unit-tests commit added

#5 @swissspidy
4 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 48474:

Sitemaps: Exclude post types and taxonomies that are not publicly queryable.

Props Cybr.
Fixes #50607.

#6 @SergeyBiryukov
4 years ago

In 49140:

Tests: Correct the message in a sitemaps test for getting a URL list for a custom taxonomy that is not publicly queryable.

Follow-up to [48474].

See #51344, #50607.

Note: See TracTickets for help on using tickets.