[wp-trac] [WordPress Trac] #33816: Rewrite rules may be flushed incorrectly when home, siteurl, or page_on_front is updated in multisite

WordPress Trac noreply at wordpress.org
Mon Sep 28 22:54:57 UTC 2015


#33816: Rewrite rules may be flushed incorrectly when home, siteurl, or
page_on_front is updated in multisite
---------------------------+------------------------
 Reporter:  jeremyfelt     |       Owner:
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  4.4
Component:  Rewrite Rules  |     Version:  3.0
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |     Focuses:  multisite
---------------------------+------------------------
Changes (by jeremyfelt):

 * milestone:  Future Release => 4.4


Comment:

 [https://core.trac.wordpress.org/attachment/ticket/33816/33816.2.diff
 33816.2.diff] targets the specific issue and leaves
 `flush_rewrite_rules()` as is for now.

 A better description of what happens here:

 1. A staging site is setup, plugins are activated, and content is entered
 at `https://stage.foo.bar/`.
 2. A custom post type is added by a plugin so that the URL
 `https://stage.foo.bar/my-content-type/` is valid.
 3. The staging site URL is updated in the network admin to
 `https://foo.bar/`.
 4. `https://foo.bar/my-content-type/` is now a 404 because the rewrite
 rules were generated in the context of the network's main site.

 Deleting the `rewrite_rules` option rather than flushing rewrite rules in
 this scenario will result in proper rewrite rules being generated on that
 site's next page view.

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


More information about the wp-trac mailing list