[wp-trac] [WordPress Trac] #36188: After WordPress installation, the default category archive page is showing a 404 page
WordPress Trac
noreply at wordpress.org
Thu Dec 15 04:40:51 UTC 2016
#36188: After WordPress installation, the default category archive page is showing
a 404 page
-----------------------------------+-----------------------------
Reporter: strategio | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Rewrite Rules | Version: 4.2
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion | Focuses:
-----------------------------------+-----------------------------
Comment (by dlh):
@seancjones: I found your patch after encountering this bug recently, and
it works as expected.
However, I'm not sure it's true that `init` is not fired during
installation. I called `did_action( 'init' )` just before
`flush_rewrite_rules()` in `wp_install()` and got back `1`.
If I'm reading correctly, the taxonomies are registered on `init` during
installation, but permastructs are skipped in
`WP_Taxonomy::add_rewrite_rules()` because
{{{
is_admin() || '' != get_option( 'permalink_structure' ) )
}}}
is `false` (a permalink structure is usually set in
`wp_install_maybe_enable_pretty_permalinks()`, though).
Also, I think there's still a chance that third-party code will run during
installation. For example, if `WP_DEFAULT_THEME` registers taxonomies, it
would be subject to the same bug. Firing `init` fixes the bug, but it
seems like it will also cause whatever is hooked to `init` to run twice,
which callbacks might not expect.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36188#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list