• Resolved wordpresspresser

    (@wordpresspresser)


    Hi,

    This error has been thrown for about a month (I’m not sure exactly) on my site. Doesn’t seem to affect the functionality, but I figure it’s time to mention it. Here is a stack dump from the Query Monitor plugin. Thank you!

    SELECT *
    FROM jyzok_nm_personalized
    WHERE productmeta_categories != ''
    
    wc_get_template_part()
    wp-content/plugins/woocommerce/includes/wc-core-functions.php:181
    load_template('wp-content/themes/ascend_premium/woocommerce/content-product.php')
    wp-includes/template.php:706
    do_action('woocommerce_after_shop_loop_item_title')
    wp-includes/plugin.php:465
    woocommerce_template_loop_price()
    wp-content/plugins/woocommerce/includes/wc-template-functions.php:1224
    wc_get_template()
    wp-content/plugins/woocommerce/includes/wc-core-functions.php:211
    WC_Product->get_price_html()
    wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1740
    apply_filters('woocommerce_get_price_html')
    wp-includes/plugin.php:208
    ppom_woocommerce_alter_price()
    wp-content/plugins/woocommerce-product-addon/inc/woocommerce.php:583
    ppom_has_field_by_type()
    wp-content/plugins/woocommerce-product-addon/inc/functions.php:607
    PPOM_Meta->__construct()
    wp-content/plugins/woocommerce-product-addon/classes/ppom.class.php:20
    PPOM_Meta->all_ppom_with_categories()
    wp-content/plugins/woocommerce-product-addon/classes/ppom.class.php:217
    
    Plugin: woocommerce-product-addon
    
    Unknown column 'productmeta_categories' in 'where clause'

    And here is a sample error from error_log:

    [07-Apr-2019 17:50:30 UTC] WordPress database error Unknown column 'productmeta_categories' in 'where clause' for query SELECT * FROM jyzok_nm_personalized WHERE productmeta_categories != '' made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ascend_premium/woocommerce/archive-product.php'), wc_get_template_part, load_template, require('/themes/ascend_premium/woocommerce/content-product.php'), do_action('woocommerce_after_shop_loop_item'), WP_Hook->do_action, WP_Hook->apply_filters, woocommerce_template_loop_add_to_cart, wc_get_template, include('/plugins/woocommerce/templates/loop/add-to-cart.php'), WC_Product_Simple->add_to_cart_text, apply_filters('woocommerce_product_add_to_cart_text'), WP_Hook->apply_filters, NM_PersonalizedProduct->loop_add_to_cart_text, PPOM_Meta->__construct, PPOM_Meta->all_ppom_with_categories, QM_DB->query

    • This topic was modified 5 years, 7 months ago by wordpresspresser. Reason: added sample error_log entry
Viewing 10 replies - 1 through 10 (of 10 total)
  • Hi,

    Wich plugin version are you using? Make sure you have latest version installed.

    • This reply was modified 5 years, 7 months ago by N-Media.
    Thread Starter wordpresspresser

    (@wordpresspresser)

    17.0. But, I’m pretty sure this goes back to at least sometime in February — it’s not new with 17.0. [I was hoping 17.0 and at least one prior update would fix it.]

    Thanks!

    Yes, the latest version has fixed. it was an old issue.

    Thread Starter wordpresspresser

    (@wordpresspresser)

    Hi,

    No. I just installed 17.1 and can confirm that the error is still thrown exactly like I detailed above? I’ll repost the details under 17.1 below, just in case anything small changed and I didn’t notice. Thank you.

    SELECT *
    FROM jyzok_nm_personalized
    WHERE productmeta_categories != ''
    
    wc_get_template_part()
    wp-content/plugins/woocommerce/includes/wc-core-functions.php:181
    load_template('wp-content/themes/ascend_premium/woocommerce/content-product.php')
    wp-includes/template.php:706
    do_action('woocommerce_after_shop_loop_item_title')
    wp-includes/plugin.php:465
    woocommerce_template_loop_price()
    wp-content/plugins/woocommerce/includes/wc-template-functions.php:1224
    wc_get_template()
    wp-content/plugins/woocommerce/includes/wc-core-functions.php:211
    WC_Product->get_price_html()
    wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1740
    apply_filters('woocommerce_get_price_html')
    wp-includes/plugin.php:208
    ppom_woocommerce_alter_price()
    wp-content/plugins/woocommerce-product-addon/inc/woocommerce.php:583
    ppom_has_field_by_type()
    wp-content/plugins/woocommerce-product-addon/inc/functions.php:643
    PPOM_Meta->__construct()
    wp-content/plugins/woocommerce-product-addon/classes/ppom.class.php:20
    PPOM_Meta->all_ppom_with_categories()
    wp-content/plugins/woocommerce-product-addon/classes/ppom.class.php:217
    
    Plugin: woocommerce-product-addon 	
    
    Unknown column 'productmeta_categories' in 'where clause'

    Hi,

    ok I see, well you updated PPOM from older version to latest one in some stage where you missed database table update, so you know you have old table schema which is not updated. Better if you deactivate plugin and then activate again, it should update table and fix it.

    Thread Starter wordpresspresser

    (@wordpresspresser)

    Great, thanks. All of my settings will be preserved, right? I just did an Export, just in case. Anything else you would recommend? Thank you.

    Yes, your settings will be preserved. Please try it.

    Thread Starter wordpresspresser

    (@wordpresspresser)

    Seemed to work perfectly. Thank you very much for helping me.

    In order to avoid a future recurrence of what you suspect happened, wouldn’t it be fairly easy to store the version # of the table schema in the db record and then have the plugin code throw a very specific error (and directions to fix) in the event that there is a version mismatch?

    Hi,

    Cheers, and we have managed this. It not be conflicted in future :).

    If you like our plugin and support please rate our plugin.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @becspro Why did you report this topic?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Unknown column productmeta_categories in where clause’ is closed to new replies.