<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: WordPress + Invalid URLs = Extra Database Queries</title>
	<atom:link href="http://maisonbisson.com/blog/post/12035/wordpress-invalid-urls-extra-database-queries/feed/" rel="self" type="application/rss+xml" />
	<link>http://maisonbisson.com/blog/post/12035/wordpress-invalid-urls-extra-database-queries/</link>
	<description>A bunch of stuff I would have emailed you about.</description>
	<lastBuildDate>Mon, 15 Mar 2010 12:59:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Sandra</title>
		<link>http://maisonbisson.com/blog/post/12035/wordpress-invalid-urls-extra-database-queries/comment-page-1/#comment-194073</link>
		<dc:creator>Sandra</dc:creator>
		<pubDate>Mon, 19 May 2008 10:46:43 +0000</pubDate>
		<guid isPermaLink="false">http://maisonbisson.com/blog/post/12035/wordpress-invalid-urls-extra-database-queries#comment-194073</guid>
		<description>Hi, 

I found your post interesting and have implemented your code, but it does not seem to work on my version of wordpress. 

The problem I am trying to solve is showing blank screen when invalid URL is entered.
I am using permalinks and here is what i would like:

I have a site:  www.mysite.com/myblog/ 

If I type in address bar the following:

www.mysite.com/myblog/somecrap

This returns blank page.

I have found out that the SQL query is built and posts table read with &quot;somecrap&quot; as post name.

The number of affected rows returned is zero, but in classes.php the error is cleared  (there is a comment in the code saying that as there is &#039;something&#039; in the url, they should clear the error) and hence the above code never executes. 

What I would expect to happen is that when no posts is returned as a result of this query, I am shown &quot;post not found&quot; or similar message. 

I do not really know php and even less on how in wordpress all hangs together, and am a bit concerned if I put some changes (such as condition on number of rows returned == 0 instead of checking for error, then that I will damage some other bits of wordpress such as posting, searching categories etc. 

Do you have any idea what I could do?

Many thanks, 

Sandra</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>I found your post interesting and have implemented your code, but it does not seem to work on my version of wordpress. </p>
<p>The problem I am trying to solve is showing blank screen when invalid URL is entered.<br />
I am using permalinks and here is what i would like:</p>
<p>I have a site:  <a href="http://www.mysite.com/myblog/" rel="nofollow">http://www.mysite.com/myblog/</a> </p>
<p>If I type in address bar the following:</p>
<p><a href="http://www.mysite.com/myblog/somecrap" rel="nofollow">http://www.mysite.com/myblog/somecrap</a></p>
<p>This returns blank page.</p>
<p>I have found out that the SQL query is built and posts table read with &#8220;somecrap&#8221; as post name.</p>
<p>The number of affected rows returned is zero, but in classes.php the error is cleared  (there is a comment in the code saying that as there is &#8217;something&#8217; in the url, they should clear the error) and hence the above code never executes. </p>
<p>What I would expect to happen is that when no posts is returned as a result of this query, I am shown &#8220;post not found&#8221; or similar message. </p>
<p>I do not really know php and even less on how in wordpress all hangs together, and am a bit concerned if I put some changes (such as condition on number of rows returned == 0 instead of checking for error, then that I will damage some other bits of wordpress such as posting, searching categories etc. </p>
<p>Do you have any idea what I could do?</p>
<p>Many thanks, </p>
<p>Sandra</p>
]]></content:encoded>
	</item>
</channel>
</rss>