You are currently browsing the daily archive for March 26th, 2007.

Testing. Testing.

This post is a placeholder because WordPress is bugged and incapable of dealing with the notion of a brand new blog that has yet to receive any real posts. I’ll get around to writing something soon. Probably.

See… I’ve been writing software for a while now. I’ve even put my hand to the odd PHP/MySQL system before. And this sort of bug really annoys me. WordPress is a great application. I use it to host my personal web site. Yet… they’ve never gotten around to patching this issue. I understand that it is an edge case (any blog w/o posts is either going to have a post soon or has been abandoned), but that’s no excuse.

Pseudo-solution:


$query = "select * from wp_posts";
$result = mysql_query($query);
if( mysql_num_rows($result) > 0 ) {
    render_the_site_as_normal();
} else {
    // complain_and_throw_an_error();
    render_placeholder_because_there_are_no_posts_yet();
}

Notice my clever swapping of the “file not found” type error screen for a useful message? Yeah. It honestly is that simple.

 

March 2007
S M T W T F S
    Apr »
 123
45678910
11121314151617
18192021222324
25262728293031