divrom,
I’ll look into this and see what I can come up with.
Did you backup your files before modifying them?
Try replacing all the *comments files with files from a feshly downloaded WP package, and make sure you have the WP version numbers matched up, in case you were using 1.0.2 or something.
Thread Starter
divrom
(@divrom)
No, Amit, where’s the challenge in that?! ;o) I didn’t backup anything ‘cos it didn’t enter my head that there would be a problem.
2fargon, tried that – no change.
Thread Starter
divrom
(@divrom)
Here’s some added info:
When I go into admin and go to EDIT –> comments, I get this message..
Database error: [You have an error in your SQL syntax near ‘ORDER BY comment_date DESC LIMIT 20’ at line 1]
SELECT * FROM ORDER BY comment_date DESC LIMIT 20
No comments found.
The silly thing is that I know there are comments and they even show up in the recent comments list on the right.
Thread Starter
divrom
(@divrom)
Any other ideas?
We had done most of the testing and were on the verge of making this our main site. The only thing left, after customising it to work like a mini-CMS, was a bit of tweaking.
So I’m extremely reluctant to re-install!
It sounds like your settings might be messed up. Check the /wp-settings.php file for this line (18):
$tablecomments = $table_prefix . 'comments';
That’s what it should be set to from the default install.
Thread Starter
divrom
(@divrom)
Thanks for that Schlosna. I’d got it sorted just before I saw your post.
In the end I had to edit wp-comments.php and change line 20:
$comments = $wpdb->get_results(“SELECT * FROM $wpdb->comments WHERE comment_post_ID = ‘$id’ AND comment_approved = ‘1’ ORDER BY comment_date”);
to
$comments = $wpdb->get_results(“SELECT * FROM $tablecomments WHERE comment_post_ID = ‘$id’ AND comment_approved = ‘1’ ORDER BY comment_date”);
Works fine now, ‘cept for the numbers all being the same (so I just changed it to a UL).
That means you downloaded a mismatched file from a different version, and you may have other problems in the future. It sounds like you’re running 1.2, and the file you downloaded is not 1.2, it’s CVS.
I guess I could be nice and offer up a copy of a non-hacked wp-comments.php from the WP 1.2 package to people who decide that they don’t need my functionality.
Thread Starter
divrom
(@divrom)
Yeah, I’m worried about those problems, allusion.
The line I added was taken from a WuhWuh version of wp-comments.php (is that the same as CVS?). I am running 1.2 as you said. But I tried everything else – bar reinstalling everything – and this is the only thing that worked.