Title: &#8216;date_modified&#8217; column error
Last modified: May 28, 2023

---

# ‘date_modified’ column error

 *  Resolved [hugemagic](https://wordpress.org/support/users/hugemagic/)
 * (@hugemagic)
 * [3 years ago](https://wordpress.org/support/topic/date_modified-column-error/)
 * We are getting ready to launch our website with SliceWP and we noticed its no
   longer tracking visit. I am getting an error in my php error log:
 * [Sat May 27 17:28:03.791354 2023] [proxy_fcgi:error] [pid 6584:tid 139749973026560][
   client 209.126.84.28:55480] AH01071: Got error ‘PHP message: WordPress database
   error Unknown column ‘date_modified’ in ‘field list’ for query INSERT INTO `wp_slicewp_visits`(`
   affiliate_id`, `landing_url`, `referrer_url`, `ip_address`, `date_created`, `
   date_modified`) VALUES (73, ‘[https://mypoptag.com/p/Jg123/&#8217](https://mypoptag.com/p/Jg123/&#8217);,”,‘
   24.205.61.230’, ‘2023-05-28 00:28:03’, ‘2023-05-28 00:28:03’) made by do_action(‘
   wp_ajax_nopriv_slicewp_register_visit’), WP_Hook->do_action, WP_Hook->apply_filters,
   SliceWP_Tracking->register_visit, slicewp_insert_visit, SliceWP_Object_DB->insert’,
   referer: [https://mypoptag.com/p/Jg123/?aff=73](https://mypoptag.com/p/Jg123/?aff=73)
 * How do we fix this, I have tried removing and reinstalling the plugin which didn’t
   help.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdate_modified-column-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [iova.mihai](https://wordpress.org/support/users/iovamihai/)
 * (@iovamihai)
 * [3 years ago](https://wordpress.org/support/topic/date_modified-column-error/#post-16774296)
 * Hey [@hugemagic](https://wordpress.org/support/users/hugemagic/),
 * Thank you for reaching out! It looks like one of the columns from the visits 
   database tables is missing, thus the error.
 * Why this column is missing however, I can’t say, as we have not modified the 
   structure of the visits database table these past few years.
 * Nevertheless, I believe that this following code will help:
 *     ```wp-block-code
       function slicewp_custom_update_database_table_visits() {
   
       	if ( ! function_exists( 'slicewp' ) ) {
       		return;
       	}
   
       	if ( empty( $_GET['page'] ) || strpos( $_GET['page'], 'slicewp' ) !== 0 ) {
       		return;
       	}
   
       	if ( empty( slicewp()->db['visits'] ) ) {
       		return;
       	}
   
       	slicewp()->db['visits']->create_table();
   
       }
       add_action( 'admin_init', 'slicewp_custom_update_database_table_visits' );
       ```
   
 * Please copy the code and add it to your website. If you’re not sure how to add
   code snippets to your site, you can use the Code Snippets plugin ([https://wordpress.org/plugins/code-snippets/](https://wordpress.org/plugins/code-snippets/)).
 * Once you add the code snippet to your website, please visit one of SliceWP’s 
   admin page to trigger the code. The code will run automatically when you visit
   a SliceWP admin page. It will attempt to rebuild the visits database table.
 * Once you’ve visited a SliceWP admin page, you can go ahead and remove this code
   snippet, as it will not be required anymore. The database table should be rebuilt
   and it should contain the date_modified column.
 * Please try it out and let me know how it goes.
 * Thank you and best wishes,
 * Mihai

Viewing 1 replies (of 1 total)

The topic ‘‘date_modified’ column error’ is closed to new replies.

 * ![](https://ps.w.org/slicewp/assets/icon-256x256.png?rev=2432848)
 * [Affiliate Program Suite — SliceWP Affiliates](https://wordpress.org/plugins/slicewp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/slicewp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/slicewp/)
 * [Active Topics](https://wordpress.org/support/plugin/slicewp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/slicewp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/slicewp/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [iova.mihai](https://wordpress.org/support/users/iovamihai/)
 * Last activity: [3 years ago](https://wordpress.org/support/topic/date_modified-column-error/#post-16774296)
 * Status: resolved