[wp-trac] [WordPress Trac] #50515: redirect_sitemapxml should exit if wp_sitemaps_enabled is false

WordPress Trac noreply at wordpress.org
Tue Jun 30 14:23:08 UTC 2020


#50515: redirect_sitemapxml should exit if wp_sitemaps_enabled is false
----------------------------+---------------------
 Reporter:  jonoaldersonwp  |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  5.5
Component:  Sitemaps        |     Version:
 Severity:  major           |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+---------------------
Description changed by jonoaldersonwp:

Old description:

> When XML sitemaps are disabled via `wp_sitemaps_enabled`,
> `redirect_sitemapxml` still runs and redirects requests from
> `/sitemap.xml` to `/wp-sitemap.xml`.
>
> This is unintended behaviour; if the sitemaps are disabled, this redirect
> should be disabled.

New description:

 When XML sitemaps are disabled via `wp_sitemaps_enabled`,
 `redirect_sitemapxml` still runs and redirects requests from
 `/sitemap.xml` to `/wp-sitemap.xml`.

 This is unintended behaviour; if the sitemaps are disabled, this redirect
 should be disabled.

 See https://github.com/WordPress/wordpress-develop/blob/master/src/wp-
 includes/sitemaps/class-wp-sitemaps.php#L205

--

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50515#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list