Title: Code error for delete history
Last modified: September 21, 2020

---

# Code error for delete history

 *  Resolved [Graham](https://wordpress.org/support/users/sandgroper/)
 * (@sandgroper)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/code-error-for-delete-history/)
 * When you delete the history, you get an error log file created. This is because
   of an error in:
 * /admin/class-page-visit-counter-admin.php
 * Line 634 has the wp database prefix included, which gives a double prefix, causing
   the error:
 * `$reset_result_referer = $wpdb->query( "TRUNCATE TABLE {$wpdb->prefix}wp_page_visit_referer");`
 * It should be:
 * `$reset_result_referer = $wpdb->query( "TRUNCATE TABLE {$wpdb->prefix}page_visit_referer");`

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

 *  Plugin Author [Dotstore](https://wordpress.org/support/users/dots/)
 * (@dots)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/code-error-for-delete-history/#post-13472437)
 * Hello sandgroper,
 * Thanks for reaching out to us.
 * We have troubleshoot and updated the code as you provided the correct code in
   our latest version 6.0.5
 * Please update it and let us know still you face any issue we are happy to help.
 * Thanks,
 *  Thread Starter [Graham](https://wordpress.org/support/users/sandgroper/)
 * (@sandgroper)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/code-error-for-delete-history/#post-13475713)
 * Unfortunately, you have bumped the minimum WP version to 5.0 and I run ClassicPress,
   which is a fork of the 4.9 branch.
 * So I am unable to update to the new version.
 *  Thread Starter [Graham](https://wordpress.org/support/users/sandgroper/)
 * (@sandgroper)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/code-error-for-delete-history/#post-13475867)
 * I changed the version requirement setting, re-zipped it and it installed okay.
 * Deleted the page visits and there were no problems. So it is fixed.

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

The topic ‘Code error for delete history’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/page-visit-counter_65aed3.svg)
 * [Page Visit Counter](https://wordpress.org/plugins/page-visit-counter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/page-visit-counter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/page-visit-counter/)
 * [Active Topics](https://wordpress.org/support/plugin/page-visit-counter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/page-visit-counter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/page-visit-counter/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Graham](https://wordpress.org/support/users/sandgroper/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/code-error-for-delete-history/#post-13475867)
 * Status: resolved