Make WordPress Core

Opened 12 months ago

Closed 12 months ago

Last modified 8 months ago

#50607 closed defect (bug) (fixed)

Filter non-publicly_queryable from the sitemap

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


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 12 months ago.
50607.diff (7.0 KB) - added by swissspidy 12 months ago.

Download all attachments as: .zip

Change History (8)

12 months ago

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

12 months ago

#2 @SergeyBiryukov
12 months ago

  • Milestone changed from Awaiting Review to 5.5

#3 @swissspidy
12 months ago

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

12 months ago

#4 @swissspidy
12 months ago

  • Keywords has-unit-tests commit added

#5 @swissspidy
12 months 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
8 months 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.