Changes between Initial Version and Version 1 of Ticket #18318
- Timestamp:
- 08/03/2011 08:28:15 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #18318
-
Property
Status
changed from
new
toclosed
-
Property
Component
changed from
General
toCanonical
-
Property
Resolution
changed from
to
duplicate
-
Property
Milestone
changed from
Awaiting Review
to
-
Property
Status
changed from
-
Ticket #18318 – Description
initial v1 19 19 $post_type = 'page'; 20 20 else 21 $post_type = 'post';}}} 21 $post_type = 'post'; 22 }}} 22 23 23 24 The trouble is pagename in $wp_query->query_vars['pagename'] is never set/found, so the guess for post_type always guesses the post_type as a 'post'. Thus when a page redirect is expected, the query doesn't fetch any results. 24 25 25 26 example query vars for post expecting redirection 27 {{{ 26 28 Array ( [page] => 0 [name] => sample-post-with-threaded-comments [error] => [m] => 0 [p] => 0 [post_parent] => [subpost] => [subpost_id] => [attachment] => [attachment_id] => 0 [static] => [pagename] => [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 ( ) [ignore_sticky_posts] => [suppress_filters] => [cache_results] => 1 [update_post_term_cache] => 1 [update_post_meta_cache] => 1 [post_type] => [posts_per_page] => 10 [nopaging] => [comments_per_page] => 50 [no_found_rows] => [order] => DESC ) 27 29 28 30 example query vars for page expecting redirection 29 31 Array ( [page] => 0 [name] => sumedh [error] => [m] => 0 [p] => 0 [post_parent] => [subpost] => [subpost_id] => [attachment] => [attachment_id] => 0 [static] => [pagename] => [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 ( ) [ignore_sticky_posts] => [suppress_filters] => [cache_results] => 1 [update_post_term_cache] => 1 [update_post_meta_cache] => 1 [post_type] => [posts_per_page] => 10 [nopaging] => [comments_per_page] => 50 [no_found_rows] => [order] => DESC ) 32 }}}