Bug #20860
closedis_home() issue in buddypress-docs linked to sitemap mods
0%
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
Updated by Boone Gorges about 1 month ago
- Related to Support #17010: robots.txt added
Updated by Raymond Hoh about 1 month ago
- Status changed from New to Staged for Production Release
Thanks for finding the is_home()
cause, Boone! I've added a better sitemap check during the 'pre_get_posts'
hook in https://github.com/cuny-academic-commons/cac/commit/ec16a3dba3ad6cc8ecd5c93092c2b738708eb290. I've pushed the fix to production as well.
With regards to BuddyPress Docs, I was able to duplicate the is_home()
bug on another non-Commons install. I'll see if I can get a list of steps to reproduce.
Updated by Boone Gorges about 1 month ago
- Status changed from Staged for Production Release to Resolved