Category issue
-
Hi all
I have had a report on one of my sites that the ‘blog’ area, used for news and events, is returning a page not found error. Looking at the website logs, I found the error:
rockbournevillagehall.org.uk [Tue Dec 17 00:52:57 2013] [error] [client 5.10.83.39:54493] AH01215: WordPress database 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 1 for query SELECT post_modified FROM wp_posts WHERE id = made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/rvh/404.php'), get_footer, locate_template, load_template, require_once('/themes/rvh/footer.php'), mdv_last_modified
Having Googled it, I find that this is not uncommon, but many of the errors reported actually have some code in between the single quotes where it says ‘for the right syntax to use near’, but I have little to go on.
Going by advice given in other threads, I tried going back to a default theme and disabling all plugins which made no difference. I also tried returning to the default Permalink structure. That worked and all posts displayed. This led me to believe that it may be category based.
Looking at the categories, two posts were incorrectly marked as Uncategorized, so I fixed those to have the correct category and put my Permalink structure back to how it should be /%category%/%postname%/. Now the Not Found error has gone and the initial error is no longer appearing in the logs, but only those two posts that I fixed are displaying and no others.
The only changes to the site lately have been some additions to the styles and editor styles to support the use of a different font in the most recent post.
Please could anyone point me in the right direction as to how to track down what is causing this error?
The site is https://www.rockbournevillagehall.org.uk.
Any advice is much appreciated.
- The topic ‘Category issue’ is closed to new replies.