Title: Not Logging
Last modified: February 26, 2018

---

# Not Logging

 *  Resolved [Tommy White](https://wordpress.org/support/users/twdesigns/)
 * (@twdesigns)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/not-logging-3/)
 * I’ve noticed that this plugin is not logging after someone rates.
    I also can
   not delete logs (only 5 showing, but says 92 people have voted). Error: An Error
   Has Occured While Deleting All Rating Logs
 * Suggestions anyone?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * (@gamerz)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/not-logging-3/#post-10014823)
 * Most likely it is an issue on your end as I can’t reproduce it on my side.
 * Check your DB using PHPMyAdmin to see if the wp_ratings table exists?
 * To debug, add this line
 *     ```
       error_log( $wpdb->prepare( "INSERT INTO {$wpdb->ratings} VALUES (%d, %d, %s, %d, %d, %s, %s, %s, %d )", 0, $post_id, $post_title, $ratings_value[$rate-1], current_time('timestamp'), get_ipaddress(), @gethostbyaddr( get_ipaddress() ), $rate_user, $rate_userid ) );
       ```
   
 * BEFORE line 578 of wp-postratings.php [https://github.com/lesterchan/wp-postratings/blob/master/wp-postratings.php#L578](https://github.com/lesterchan/wp-postratings/blob/master/wp-postratings.php#L578)
 * Then try to rate it and check your server error logs.
 *  Thread Starter [Tommy White](https://wordpress.org/support/users/twdesigns/)
 * (@twdesigns)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/not-logging-3/#post-10016355)
 * Lester,
 * Thank you for getting back with me so quickly. I tried to do the above but the
   site would just white screen. I do however have another logging application installed
   and these are the two messages it gives me.
 * This happens when I try to clear the logs.
 * `[26-Feb-2018 16:13:56 UTC] WordPress database error You have an error in your
   SQL syntax; check the manual that corresponds to your MariaDB server version 
   for the right syntax to use near ')' at line 1 for query DELETE FROM cc_ratings
   WHERE rating_postid IN () made by include('/plugins/wp-postratings/postratings-
   manager.php')`
 * And this happens when someone votes.
 * `[26-Feb-2018 16:16:13 UTC] WordPress database error Column count doesn't match
   value count at row 1 for query INSERT INTO cc_ratings VALUES (0, 1828, 'Carrabba\\\'
   s Italian Grill', 5, 1519661773, '199.X.X.X', 'www.hostname.com', 'Tommy White',
   1 ) made by do_action('wp_ajax_postratings'), WP_Hook->do_action, WP_Hook->apply_filters,
   call_user_func_array, process_ratings`
 * I’m sure it’s on my end. I reloaded the Plugin with a fresh copy earlier before
   testing to make sure.
 * Thanks in advance!
 *  Plugin Author [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * (@gamerz)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/not-logging-3/#post-10018249)
 * It seems to be your MariaDB config. You need to disable NO_AUTO_VALUE_ON_ZERO.
   [https://mariadb.com/kb/en/library/auto_increment/](https://mariadb.com/kb/en/library/auto_increment/)
 *  Thread Starter [Tommy White](https://wordpress.org/support/users/twdesigns/)
 * (@twdesigns)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/not-logging-3/#post-10018295)
 * Problem resolved. Thank you good sir!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Not Logging’ is closed to new replies.

 * ![](https://ps.w.org/wp-postratings/assets/icon.svg?rev=978014)
 * [WP-PostRatings](https://wordpress.org/plugins/wp-postratings/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-postratings/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-postratings/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-postratings/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-postratings/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-postratings/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Tommy White](https://wordpress.org/support/users/twdesigns/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/not-logging-3/#post-10018295)
 * Status: resolved