• Resolved hugemagic

    (@hugemagic)


    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/’, ”, ‘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

    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 to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author iova.mihai

    (@iovamihai)

    Hey @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:

    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://ww.wp.xz.cn/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.