Project

General

Profile

Actions

Bug #20860

closed

is_home() issue in buddypress-docs linked to sitemap mods

Added by Boone Gorges 3 months ago. Updated 3 months ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
-
Target version:
Start date:
2024-08-30
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

Previously: #17010

In that ticket, Ray introduced a potential privacy bug where the sitemap included private BuddyPress Docs. See https://github.com/cuny-academic-commons/cac/commit/881caa13e1fec7ed291e7c00c691148e15e41965

However, the did_action( 'wp_sitemaps_init' ) check is too broad. That action doesn't just run when a sitemap is being generated, but on every pageload. https://github.com/cuny-academic-commons/cac/blob/5cd49f47e304939fc3674fff7380befc364c31ab/wp-includes/default-filters.php#L516

In order to detect a sitemaps request, we may need to do something like WP does: https://github.com/cuny-academic-commons/cac/blob/5cd49f47e304939fc3674fff7380befc364c31ab/wp-includes/sitemaps/class-wp-sitemaps.php#L167

As it stands, the wp_sitemaps_init check is (somehow) causing is_home() to return true when it shouldn't. See https://github.com/boonebgorges/buddypress-docs/issues/757


Related issues

Related to CUNY Academic Commons - Support #17010: robots.txt ResolvedRaymond Hoh2022-10-12

Actions
Actions

Also available in: Atom PDF