Opened 15 years ago
Closed 15 years ago
#8585 closed defect (bug) (worksforme)
query_posts fails when I set category
Reported by: | juliovedovatto | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.7 |
Component: | General | Keywords: | query_posts fails category true |
Focuses: | Cc: |
Description
I am using this code in my theme to query the posts.
<?php wp_reset_query(); query_posts(array( 'cat' => 7, 'orderby' => "date", 'order' => "DESC", 'post__not_in' => array(25,26,27), 'showposts' => 0, 'nopaging' => true )); ?>
In the 2.6 version works fine this, when a made de Update to 2.7 the theme isn't loading.
After few hours debugging, I found the misterious cause.
wp-includes.php (line ~ 1328)
<?php if ( empty($qv['cat']) || ($qv['cat'] == '0') ) { $this->is_category = false; } else { if (strpos($qv['cat'], '-') !== false) { $this->is_category = false; } else { $this->is_category = true; //Fails here } } ?>
When the variable $this->is_category is set to TRUE, the script "mysteriously" fails, any thing after the line doesn't load.
What I need to do to this works?
regards,
Julio
Change History (2)
Note: See
TracTickets for help on using
tickets.
Punting due to feature freeze. Reconsider with next release.