[wp-trac] [WordPress Trac] #16786: Setting permalinks programatically breaks custom post type URL's
WordPress Trac
wp-trac at lists.automattic.com
Mon Mar 7 15:58:45 UTC 2011
#16786: Setting permalinks programatically breaks custom post type URL's
---------------------------+-----------------------------
Reporter: gilbitron | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Rewrite Rules | Version: 3.1
Severity: minor | Keywords: 2nd-opinion
---------------------------+-----------------------------
Using a function to programatically set permalinks (see attached) breaks
custom post type URL's. A 404 page is displayed instead.
Visiting the Permalinks settings page fixes the issue (you don't even need
to save the permalinks settings).
It turns out that you need to call $wp_rewrite->flush_rules() on the
following page load for it to work, even though this is called at the end
of the modify_permalinks() function.
Possibly related to #16736
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16786>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list