ewagoner
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: “Sorry, no posts matched your criteria” when updating.It was the “Adhesive” plugin. Thanks for the pointer!
Forum: Fixing WordPress
In reply to: “Sorry, no posts matched your criteria” when updating.Ah. It’s not a theme (I tried all the defaults as well as my original), so I’ll try the plugins. They all worked for 2.0, but maybe one broke by 2.0.4
Forum: Fixing WordPress
In reply to: “Sorry, no posts matched your criteria” when updating.I fixed the problem by commenting out two lines in wp-includes/classes.php:
616: $where = apply_filters('posts_where', $where);
696: $this->posts = apply_filters('the_posts', $this->posts);
The first line was setting the 1=0 line in the WHERE statement. The second line was turning the array of returned posts into a NULL array (after the first line was fixed).
I looked through the code and couldn’t find out what those two lines were supposed to be doing. Commenting them out returns my pages to normal.
Forum: Fixing WordPress
In reply to: “Sorry, no posts matched your criteria” when updating.Rooting around further, I see the SQL being called (for my front page, anyway) is this:
SELECT DISTINCT * FROM wp_posts WHERE 1=1 AND 0=1 AND post_date_gmt <= '2006-08-10 17:50:59' AND (post_status = "publish" OR post_author = 1 AND post_status != 'draft' AND post_status != 'static') AND post_status != "attachment" GROUP BY wp_posts.ID ORDER BY post_date DESC LIMIT 0, 20
Obviously, the where clause “WHERE 1=1 AND 0=1 …” will always be false. I’m looking through classes.php to find out where the “0=1” is coming from.
Forum: Fixing WordPress
In reply to: “Sorry, no posts matched your criteria” when updating.The problem is in the line
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
in the template’s index.php file, but I don’t know more yet. I’ve got a sidebar that shows the previous three posts in a specific category, and that works fine.Forum: Fixing WordPress
In reply to: “Sorry, no posts matched your criteria” when updating.This just happened to me, upgrading from 2.0 to 2.0.4
I can access all the posts via the admin section, but all of the public pages display “Sorry, no posts matched your criteria.”