Title: Errors in WordPress log
Last modified: February 26, 2020

---

# Errors in WordPress log

 *  [albertramsbottom](https://wordpress.org/support/users/albertramsbottom/)
 * (@albertramsbottom)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/errors-in-wordpress-log/)
 * I have multiple errors in my log
 * `[26-Feb-2020 21:46:33 UTC] WordPress database error Unknown column 'session_id'
   in 'where clause' for query SELECT ID FROM wp_yith_wcwl_lists WHERE session_id
   = '8caaea1dcecf068eda8ffc4d0e6c5956' AND expiration > NOW() AND is_default = 
   1 made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.
   php'), include('/themes/flatsome/page.php'), get_header, locate_template, load_template,
   require_once('/themes/flatsome/header.php'), get_template_part, locate_template,
   load_template, require('/themes/flatsome/template-parts/header/header-wrapper.
   php'), get_template_part, locate_template, load_template, require('/themes/flatsome/
   template-parts/header/header-main.php'), flatsome_header_elements, get_template_part,
   locate_template, load_template, require('/themes/flatsome/template-parts/header/
   partials/element-wishlist.php'), YITH_WCWL->count_products, YITH_WCWL_Wishlist_Factory::
   get_wishlist, YITH_WCWL_Wishlist_Factory::get_default_wishlist, WC_Data_Store-
   >__call, YITH_WCWL_Wishlist_Data_Store->get_default_wishlist`
 * and
 * `[26-Feb-2020 21:46:32 UTC] WordPress database error Unknown column 'position'
   in 'order clause' for query SELECT i.* FROM wp_yith_wcwl as i INNER JOIN wp_posts
   as p on i.prod_id = p.ID WHERE wishlist_id = 0 AND p.post_type IN ( 'product','
   product_variation' ) AND p.post_status = 'publish' ORDER BY position ASC, ID 
   ASC; made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('
   wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook-
   >do_action, WP_Hook->apply_filters, YITH_WCWL_Form_Handler::add_to_wishlist, 
   YITH_WCWL->add, YITH_WCWL_Wishlist->has_product, YITH_WCWL_Wishlist->get_items,
   WC_Data_Store->__call, YITH_WCWL_Wishlist_Data_Store->read_items`
 * I use
    YITH Essential Kit for WooCommerce #1 YITH WooCommerce Ajax Search YITH
   WooCommerce Best Sellers YITH WooCommerce Wishlist
 * Any ideas, I have tried to deactivate Yith Wishlist but still no luck and the
   wishlist doesn’t save. I also use Flatsome theme, which I believe that your plugin
   is a requirement.

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

 *  Plugin Author [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * (@yithemes)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/errors-in-wordpress-log/#post-12486070)
 * Hi there
 * it seems that there was a problem during db update process
 * My suggetion here is to manually trigger update procedure
    In order to do so,
   visit /wp-admin/options.php, locate option `yith_wcwl_db_version`, change value
   to `2.0.0` and save your options
 * This should force plugin to update database again: if everything is fine, option
   will automatically revert to `3.0.0` value
 * Let me know if this solves the issue
 *  Thread Starter [albertramsbottom](https://wordpress.org/support/users/albertramsbottom/)
 * (@albertramsbottom)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/errors-in-wordpress-log/#post-12487417)
 * Thanks for that but I have tried that before with no luck
 * Ummmm
 *  [apollo13themes](https://wordpress.org/support/users/apollo13themes/)
 * (@apollo13themes)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/errors-in-wordpress-log/#post-12487789)
 * Hey 🙂
 * It solved a problem for me, but only for one site. I have a multisite installation
   and over 100 websites. My error log is rising a few KB every minute because of
   this error with database update.
 * Do you see any solution to solve this without revisiting each page?
 * With kind regards.
    Air.
 *  Thread Starter [albertramsbottom](https://wordpress.org/support/users/albertramsbottom/)
 * (@albertramsbottom)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/errors-in-wordpress-log/#post-12487815)
 * That might be my issue as I also have a multisite with 5 woocommerce sites running
 * Cheers
 *  Plugin Author [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * (@yithemes)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/errors-in-wordpress-log/#post-12490039)
 * [@apollo13themes](https://wordpress.org/support/users/apollo13themes/) If you
   need to do the same on a large number of sites of a network, I suggest you to
   proceed using a snippet of code
 * For example, the following code
 *     ```
       function yith_wcwl_force_db_update_on_all_blogs(){
       	if( ! isset( $_GET['yith_wcwl_force_db_update_on_all_blogs'] ) ){
       		return;
       	}
   
       	$blogs = get_sites();
   
       	if( ! empty( $blogs ) ){
       		foreach( $blogs as $blog ){
       			switch_to_blog( $blog->blog_id );
       			echo 'Updating option on blog ' . $blog->blog_id . "... ";
       			update_option( 'yith_wcwl_db_version', '2.0.0' );
       			echo ' option updated!<br>';
       			restore_current_blog();
       		}
       	}
   
       	die;
       }
       add_action( 'init', 'yith_wcwl_force_db_update_on_all_blogs' );
       ```
   
 * will cycle through all defined blogs and update option for each one of them.
   
   Then, on next visit, blog will automatically perform update process
 * In order to execute the previous code, place it at the end of functions.php, 
   and visit any page of your network, adding `?yith_wcwl_force_db_update_on_all_blogs`
   to the querystring
 * Don’t forget to remove this code immediately after you’re done, and avoid executing
   it multiple times
 * Finally, a note on performance: depending on how many sites your network has,
   this function could take a lot of time, and even failing due to Max Execution
   Time reached.
    Be warned of the risk
 * [@albertramsbottom](https://wordpress.org/support/users/albertramsbottom/) if
   the solution that I suggested do not solve the issue, my best guess is that something
   is preventing automatic update procedeure do update db structure
 * Please, check your table structure on db, and dobule check that `session_id` 
   column was actually created in `yith_wcwl_lists` table; if it is not, try to 
   manually add it (at least for one blog) defining it as `VARCHAR(255) NULL` column,
   and check if this solves the issue (maybe you could ask your hosting provider
   to help with this task, if you don’t feel confortable checking db structure on
   your own)
 *  [apollo13themes](https://wordpress.org/support/users/apollo13themes/)
 * (@apollo13themes)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/errors-in-wordpress-log/#post-12491310)
 * Hey 🙂
 * Thanks for the solution and quick response. I believe it can be useful if such
   a thing occurs again.
 * I decided to revisit each admin panel manually in my multisite. I also did then
   WooCommerce database update on each site, so not really sure which of those actions
   solved the issue. However, no more errors.
 * I just wanted to say that I like such “one-time run” code solutions. Nice one
   🙂
 * With kind regards.
    Air.
 *  Plugin Author [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * (@yithemes)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/errors-in-wordpress-log/#post-12498059)
 * [@apollo13themes](https://wordpress.org/support/users/apollo13themes/) Glad to
   hear that you solved the problem, and that you appreciated my code 🙂
    Let me
   know if I can be of further assistance
 *  Thread Starter [albertramsbottom](https://wordpress.org/support/users/albertramsbottom/)
 * (@albertramsbottom)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/errors-in-wordpress-log/#post-12498244)
 * I havent solved the problem and I am the OP 🙂
 *  Plugin Author [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * (@yithemes)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/errors-in-wordpress-log/#post-12499961)
 * [@albertramsbottom](https://wordpress.org/support/users/albertramsbottom/) This
   is the reason why this topic wasn’t set as solved 🙂
    Had you the chance to perform
   the tests that I suggested in my previous answer?

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

The topic ‘Errors in WordPress log’ is closed to new replies.

 * ![](https://ps.w.org/yith-woocommerce-wishlist/assets/icon-128x128.gif?rev=3129302)
 * [YITH WooCommerce Wishlist](https://wordpress.org/plugins/yith-woocommerce-wishlist/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yith-woocommerce-wishlist/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yith-woocommerce-wishlist/)
 * [Active Topics](https://wordpress.org/support/plugin/yith-woocommerce-wishlist/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yith-woocommerce-wishlist/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yith-woocommerce-wishlist/reviews/)

 * 9 replies
 * 3 participants
 * Last reply from: [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/errors-in-wordpress-log/#post-12499961)
 * Status: not resolved