I have a very strange problem that I can't seem to find an answer to. I have a site running WP 2.7 that I just setup permalinks on. Everything is working great, but randomly when you click on a URL (which is now the permalink) it will redirect to a page like this:
http://www.domain.com/?page_id=9
Which throws this error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 7 on line: 1001
Now this doesn't happen every time you click on the URL. Sometimes it will load the correct permalink and other times it will forward to the page_id URL, which is wrong.
I verified .htaccess file is correct like so:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Any ideas on what could be causing this? It's very random and I can't seem to pinpoint the issue.
Thanks in advance