[wp-trac] [WordPress Trac] #13712: When Pretty Permalinks Enabled Custom Post Types 404 Not Found

WordPress Trac wp-trac at lists.automattic.com
Wed Jun 16 12:07:25 UTC 2010


#13712: When Pretty Permalinks Enabled Custom Post Types 404 Not Found
--------------------------+-------------------------------------------------
 Reporter:  jackreichert  |       Owner:  ryan             
     Type:  defect (bug)  |      Status:  new              
 Priority:  normal        |   Milestone:  Unassigned       
Component:  Permalinks    |     Version:  3.0              
 Severity:  normal        |    Keywords:  reporter-feedback
--------------------------+-------------------------------------------------
Changes (by ryno267):

 * cc: ryno267 (added)


Comment:

 So here's an update.  Nothing I did including the sequence sivel told me
 to run in order to get it to flush worked (sequence: enable new theme,
 visit permalinks page, add new post to custom post type, visit permalinks
 page)

 I setup a brand new install locally, added the theme, enabled permalinks
 and added a post to each of my two custom post types.  They worked fine
 locally. I exported users and posts from old live site into new local one
 and then did the same for pages.  All was working fine locally.

 Dropped database for online site, and imported the one I was using
 locally, updated the home and site domain and tested... WHOA permalinks
 worked!  Was stoked.  I made a new backup of that database of the online
 working site.

 Then: I added a couple more posts in one of the custom post types and it
 broke permalinks for all custom post types.   None of the refresh
 techniques worked.  I restored to the last working database backup that I
 made RIGHT BEFORE this and the custom post type urls still 404'd.
 Whatever happened killed it, and it's not something in the database.

 The Rewrite Rules dump is here:
 {{{
 Array
 (
     [premium/(.+?)/?$] => index.php?get_premium_file=$matches[1]
     [robots\.txt$] => index.php?robots=1
     [.*wp-atom.php$] => index.php?feed=atom
     [.*wp-rdf.php$] => index.php?feed=rdf
     [.*wp-rss.php$] => index.php?feed=rss
     [.*wp-rss2.php$] => index.php?feed=rss2
     [.*wp-feed.php$] => index.php?feed=feed
     [.*wp-commentsrss2.php$] => index.php?feed=rss2&withcomments=1
     [feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?&feed=$matches[1]
     [(feed|rdf|rss|rss2|atom)/?$] => index.php?&feed=$matches[1]
     [page/?([0-9]{1,})/?$] => index.php?&paged=$matches[1]
     [comments/feed/(feed|rdf|rss|rss2|atom)/?$] =>
 index.php?&feed=$matches[1]&withcomments=1
     [comments/(feed|rdf|rss|rss2|atom)/?$] =>
 index.php?&feed=$matches[1]&withcomments=1
     [comments/page/?([0-9]{1,})/?$] => index.php?&paged=$matches[1]
     [search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$] =>
 index.php?s=$matches[1]&feed=$matches[2]
     [search/(.+)/(feed|rdf|rss|rss2|atom)/?$] =>
 index.php?s=$matches[1]&feed=$matches[2]
     [search/(.+)/page/?([0-9]{1,})/?$] =>
 index.php?s=$matches[1]&paged=$matches[2]
     [search/(.+)/?$] => index.php?s=$matches[1]
     [category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$] =>
 index.php?category_name=$matches[1]&feed=$matches[2]
     [category/(.+?)/(feed|rdf|rss|rss2|atom)/?$] =>
 index.php?category_name=$matches[1]&feed=$matches[2]
     [category/(.+?)/page/?([0-9]{1,})/?$] =>
 index.php?category_name=$matches[1]&paged=$matches[2]
     [category/(.+?)/?$] => index.php?category_name=$matches[1]
     [tag/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$] =>
 index.php?tag=$matches[1]&feed=$matches[2]
     [tag/(.+?)/(feed|rdf|rss|rss2|atom)/?$] =>
 index.php?tag=$matches[1]&feed=$matches[2]
     [tag/(.+?)/page/?([0-9]{1,})/?$] =>
 index.php?tag=$matches[1]&paged=$matches[2]
     [tag/(.+?)/?$] => index.php?tag=$matches[1]
     [author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =>
 index.php?author_name=$matches[1]&feed=$matches[2]
     [author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =>
 index.php?author_name=$matches[1]&feed=$matches[2]
     [author/([^/]+)/page/?([0-9]{1,})/?$] =>
 index.php?author_name=$matches[1]&paged=$matches[2]
     [author/([^/]+)/?$] => index.php?author_name=$matches[1]
 [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$] =>
 index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]
     [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$] =>
 index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]
     [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$] =>
 index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&paged=$matches[4]
     [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$] =>
 index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]
     [([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$] =>
 index.php?year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]
     [([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$] =>
 index.php?year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]
     [([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$] =>
 index.php?year=$matches[1]&monthnum=$matches[2]&paged=$matches[3]
     [([0-9]{4})/([0-9]{1,2})/?$] =>
 index.php?year=$matches[1]&monthnum=$matches[2]
     [([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$] =>
 index.php?year=$matches[1]&feed=$matches[2]
     [([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$] =>
 index.php?year=$matches[1]&feed=$matches[2]
     [([0-9]{4})/page/?([0-9]{1,})/?$] =>
 index.php?year=$matches[1]&paged=$matches[2]
     [([0-9]{4})/?$] => index.php?year=$matches[1]
     [[0-9]{4}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/?$] =>
 index.php?attachment=$matches[1]
     [[0-9]{4}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/trackback/?$] =>
 index.php?attachment=$matches[1]&tb=1
 [[0-9]{4}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$]
 => index.php?attachment=$matches[1]&feed=$matches[2]
 [[0-9]{4}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$]
 => index.php?attachment=$matches[1]&feed=$matches[2]
     [[0-9]{4}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/comment-
 page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]
     [([0-9]{4})/([0-9]{1,2})/([^/]+)/trackback/?$] =>
 index.php?year=$matches[1]&monthnum=$matches[2]&name=$matches[3]&tb=1
     [([0-9]{4})/([0-9]{1,2})/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =>
 index.php?year=$matches[1]&monthnum=$matches[2]&name=$matches[3]&feed=$matches[4]
     [([0-9]{4})/([0-9]{1,2})/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =>
 index.php?year=$matches[1]&monthnum=$matches[2]&name=$matches[3]&feed=$matches[4]
     [([0-9]{4})/([0-9]{1,2})/([^/]+)/page/?([0-9]{1,})/?$] =>
 index.php?year=$matches[1]&monthnum=$matches[2]&name=$matches[3]&paged=$matches[4]
     [([0-9]{4})/([0-9]{1,2})/([^/]+)/comment-page-([0-9]{1,})/?$] =>
 index.php?year=$matches[1]&monthnum=$matches[2]&name=$matches[3]&cpage=$matches[4]
     [([0-9]{4})/([0-9]{1,2})/([^/]+)(/[0-9]+)?/?$] =>
 index.php?year=$matches[1]&monthnum=$matches[2]&name=$matches[3]&page=$matches[4]
     [[0-9]{4}/[0-9]{1,2}/[^/]+/([^/]+)/?$] =>
 index.php?attachment=$matches[1]
     [[0-9]{4}/[0-9]{1,2}/[^/]+/([^/]+)/trackback/?$] =>
 index.php?attachment=$matches[1]&tb=1
     [[0-9]{4}/[0-9]{1,2}/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$]
 => index.php?attachment=$matches[1]&feed=$matches[2]
     [[0-9]{4}/[0-9]{1,2}/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =>
 index.php?attachment=$matches[1]&feed=$matches[2]
     [[0-9]{4}/[0-9]{1,2}/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] =>
 index.php?attachment=$matches[1]&cpage=$matches[2]
     [([0-9]{4})/([0-9]{1,2})/comment-page-([0-9]{1,})/?$] =>
 index.php?year=$matches[1]&monthnum=$matches[2]&cpage=$matches[3]
     [([0-9]{4})/comment-page-([0-9]{1,})/?$] =>
 index.php?year=$matches[1]&cpage=$matches[2]
     [.+?/attachment/([^/]+)/?$] => index.php?attachment=$matches[1]
     [.+?/attachment/([^/]+)/trackback/?$] =>
 index.php?attachment=$matches[1]&tb=1
     [.+?/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] =>
 index.php?attachment=$matches[1]&feed=$matches[2]
     [.+?/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] =>
 index.php?attachment=$matches[1]&feed=$matches[2]
     [.+?/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] =>
 index.php?attachment=$matches[1]&cpage=$matches[2]
     [(.+?)/trackback/?$] => index.php?pagename=$matches[1]&tb=1
     [(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$] =>
 index.php?pagename=$matches[1]&feed=$matches[2]
     [(.+?)/(feed|rdf|rss|rss2|atom)/?$] =>
 index.php?pagename=$matches[1]&feed=$matches[2]
     [(.+?)/page/?([0-9]{1,})/?$] =>
 index.php?pagename=$matches[1]&paged=$matches[2]
     [(.+?)/comment-page-([0-9]{1,})/?$] =>
 index.php?pagename=$matches[1]&cpage=$matches[2]
     [(.+?)(/[0-9]+)?/?$] =>
 index.php?pagename=$matches[1]&page=$matches[2]
 )
 }}}

 Just to be updated... running RC3 and all plugins were the same locally as
 there were on live site.  I eliminated as many 'different' things as I
 possibly could think of.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13712#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list