[wp-trac] [WordPress Trac] #14880: 404 Errors Replaced with Category Pages

WordPress Trac wp-trac at lists.automattic.com
Mon Nov 8 10:01:16 UTC 2010


#14880: 404 Errors Replaced with Category Pages
--------------------------+-------------------------------------------------
 Reporter:  askapache     |        Owner:  scribu  
     Type:  defect (bug)  |       Status:  reopened
 Priority:  normal        |    Milestone:  3.1     
Component:  Query         |      Version:  3.1     
 Severity:  normal        |   Resolution:          
 Keywords:                |  
--------------------------+-------------------------------------------------

Comment(by askapache):

 Still broken in revision 16180, the updated wp_query for this rev is:
 {{{WP_Query Object
 (
     [post_count] => 20
     [current_post] => -1
     [in_the_loop] =>
     [comment_count] => 0
     [current_comment] => -1
     [found_posts] => 244
     [max_num_pages] => 13
     [max_num_comment_pages] => 0
     [is_single] =>
     [is_preview] =>
     [is_page] =>
     [is_archive] =>
     [is_date] =>
     [is_year] =>
     [is_month] =>
     [is_day] =>
     [is_time] =>
     [is_author] =>
     [is_category] =>
     [is_tag] =>
     [is_tax] =>
     [is_search] =>
     [is_feed] =>
     [is_comment_feed] =>
     [is_trackback] =>
     [is_home] => 1
     [is_404] =>
     [is_comments_popup] =>
     [is_paged] =>
     [is_admin] =>
     [is_attachment] =>
     [is_singular] =>
     [is_robots] =>
     [is_posts_page] =>
     [is_post_type_archive] =>
     [query_vars] => Array
         (
             [category_name] => doing-everything-i-can
             [error] =>
             [m] => 0
             [p] => 0
             [post_parent] =>
             [subpost] =>
             [subpost_id] =>
             [attachment] =>
             [attachment_id] => 0
             [name] =>
             [static] =>
             [pagename] =>
             [page_id] => 0
             [second] =>
             [minute] =>
             [hour] =>
             [day] => 0
             [monthnum] => 0
             [year] => 0
             [w] => 0
             [tag] =>
             [cat] =>
             [tag_id] =>
             [author_name] =>
             [feed] =>
             [tb] =>
             [paged] => 0
             [comments_popup] =>
             [meta_key] =>
             [meta_value] =>
             [preview] =>
             [s] =>
             [sentence] =>
             [fields] =>
             [category__in] => Array
                 (
                 )

             [category__not_in] => Array
                 (
                 )

             [category__and] => Array
                 (
                 )

             [post__in] => Array
                 (
                 )

             [post__not_in] => Array
                 (
                 )

             [tag__in] => Array
                 (
                 )

             [tag__not_in] => Array
                 (
                 )

             [tag__and] => Array
                 (
                 )

             [tag_slug__in] => Array
                 (
                 )

             [tag_slug__and] => Array
                 (
                 )

             [tax_query] => Array
                 (
                 )

             [meta_query] => Array
                 (
                 )

             [ignore_sticky_posts] =>
             [suppress_filters] =>
             [cache_results] => 1
             [update_post_term_cache] => 1
             [update_post_meta_cache] => 1
             [post_type] =>
             [posts_per_page] => 20
             [nopaging] =>
             [comments_per_page] => 50
             [no_found_rows] =>
             [order] => DESC
             [orderby] => wp5_posts.post_date DESC
         )

     [query] => Array
         (
             [category_name] => doing-everything-i-can
         )

     [request] =>  SELECT SQL_CALC_FOUND_ROWS  wp5_posts.* FROM wp5_posts
 WHERE 1=1  AND wp5_posts.post_type = 'post' AND (wp5_posts.post_status =
 'publish' OR wp5_posts.post_status = 'private')  ORDER BY
 wp5_posts.post_date DESC LIMIT 0, 20
 }}}

 But it's not just the category_name being guessed incorrectly, for a url
 without any possible category the vars are:

 {{{
 WP_Query Object
 (
     [post_count] => 20
     [current_post] => -1
     [in_the_loop] =>
     [comment_count] => 0
     [current_comment] => -1
     [found_posts] => 244
     [max_num_pages] => 13
     [max_num_comment_pages] => 0
     [is_single] =>
     [is_preview] =>
     [is_page] =>
     [is_archive] =>
     [is_date] =>
     [is_year] =>
     [is_month] =>
     [is_day] =>
     [is_time] =>
     [is_author] =>
     [is_category] =>
     [is_tag] =>
     [is_tax] =>
     [is_search] =>
     [is_feed] =>
     [is_comment_feed] =>
     [is_trackback] =>
     [is_home] => 1
     [is_404] =>
     [is_comments_popup] =>
     [is_paged] =>
     [is_admin] =>
     [is_attachment] =>
     [is_singular] =>
     [is_robots] =>
     [is_posts_page] =>
     [is_post_type_archive] =>
     [query_vars] => Array
         (
             [page] => 0
             [pagename] =>
             [error] =>
             [m] => 0
             [p] => 0
             [post_parent] =>
             [subpost] =>
             [subpost_id] =>
             [attachment] =>
             [attachment_id] => 0
             [name] =>
             [static] =>
             [page_id] => 0
             [second] =>
             [minute] =>
             [hour] =>
             [day] => 0
             [monthnum] => 0
             [year] => 0
             [w] => 0
             [category_name] =>
             [tag] =>
             [cat] =>
             [tag_id] =>
             [author_name] =>
             [feed] =>
             [tb] =>
             [paged] => 0
             [comments_popup] =>
             [meta_key] =>
             [meta_value] =>
             [preview] =>
             [s] =>
             [sentence] =>
             [fields] =>
             [category__in] => Array
                 (
                 )

             [category__not_in] => Array
                 (
                 )

             [category__and] => Array
                 (
                 )

             [post__in] => Array
                 (
                 )

             [post__not_in] => Array
                 (
                 )

             [tag__in] => Array
                 (
                 )

             [tag__not_in] => Array
                 (
                 )

             [tag__and] => Array
                 (
                 )

             [tag_slug__in] => Array
                 (
                 )

             [tag_slug__and] => Array
                 (
                 )

             [tax_query] => Array
                 (
                 )

             [meta_query] => Array
                 (
                 )

             [ignore_sticky_posts] =>
             [suppress_filters] =>
             [cache_results] => 1
             [update_post_term_cache] => 1
             [update_post_meta_cache] => 1
             [post_type] =>
             [posts_per_page] => 20
             [nopaging] =>
             [comments_per_page] => 50
             [no_found_rows] =>
             [order] => DESC
             [orderby] => ar15_posts.post_date DESC
         )

     [query] => Array
         (
             [page] =>
             [pagename] =>
         )

     [request] =>  SELECT SQL_CALC_FOUND_ROWS  ar15_posts.* FROM ar15_posts
 WHERE 1=1  AND ar15_posts.post_type = 'post' AND (ar15_posts.post_status =
 'publish' OR ar15_posts.post_status = 'private')  ORDER BY
 ar15_posts.post_date DESC LIMIT 0, 20

 }}}

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


More information about the wp-trac mailing list