Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: America/Los_Angeles (GMT-07:00)

This topic contains 5 replies, has 2 voices.

Last updated by Bobby 1 year, 8 months ago.

Assisted by: Bobby.

Author Posts
September 21, 2023 at 7:16 am #14434961

runarB-2

I'm getting an error in my logs. Not sure if there something wrong with the configuration or a bug. This is probably triggered by a customer trying to do a purchase.

```
[20-Sep-2023 18:58:42 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 3 for query SELECT post_id, meta_key, meta_value FROM wp_postmeta
WHERE meta_key IN ('_price', '_regular_price', '_sale_price', '_price_NOK', '_regular_price_NOK', '_sale_price_NOK')
AND post_id IN () 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, KCO_Confirmation->confirm_order, kco_confirm_klarna_order, WC_Order->payment_complete, WC_Order->save, WC_Order->status_transition, do_action('woocommerce_order_status_processing'), WP_Hook->do_action, WP_Hook->apply_filters, wc_update_total_sales_counts, do_action('woocommerce_recorded_sales'), WP_Hook->do_action, WP_Hook->apply_filters, WCML_Synchronize_Product_Data->sync_product_total_sales, WC_Data_Store->__call, WC_Product_Data_Store_CPT->update_product_sales, WC_Data_Store_WP->update_lookup_table, WC_Product_Data_Store_CPT->get_data_for_lookup_table, get_post_meta, get_metadata, get_metadata_raw, apply_filters('get_post_metadata'), WP_Hook->apply_filters, WCML_Multi_Currency_Prices->product_price_filter, WPML\FP\{closure}, call_user_func_array, WPML\FP\Logic::WPML\FP\{closure}, WCML_Multi_Currency_Prices->{closure}, WCML_Custom_Prices->get_product_custom_prices
```

Also these warnings precede the error with the same timestamp:
```
[20-Sep-2023 18:58:42 UTC] PHP Warning: Undefined property: stdClass::$_regular_price_NOK in /var/www/wp-site/wp-includes/class-wp-list-util.php on line 192
[20-Sep-2023 18:58:42 UTC] PHP Warning: Undefined property: stdClass::$_regular_price_NOK in /var/www/wp-site/wp-includes/class-wp-list-util.php on line 192
[20-Sep-2023 18:58:42 UTC] PHP Warning: Undefined property: stdClass::$_regular_price in /var/www/wp-site/wp-includes/class-wp-list-util.php on line 192
[20-Sep-2023 18:58:42 UTC] PHP Warning: Undefined property: stdClass::$_regular_price in /var/www/wp-site/wp-includes/class-wp-list-util.php on line 192
[20-Sep-2023 18:58:42 UTC] PHP Warning: Undefined property: stdClass::$_sale_price_NOK in /var/www/wp-site/wp-includes/class-wp-list-util.php on line 192
[20-Sep-2023 18:58:42 UTC] PHP Warning: Undefined property: stdClass::$_sale_price_NOK in /var/www/wp-site/wp-includes/class-wp-list-util.php on line 192
[20-Sep-2023 18:58:42 UTC] PHP Warning: Undefined property: stdClass::$_price_NOK in /var/www/wp-site/wp-includes/class-wp-list-util.php on line 192
[20-Sep-2023 18:58:42 UTC] PHP Warning: Undefined property: stdClass::$_price_NOK in /var/www/wp-site/wp-includes/class-wp-list-util.php on line 192
[20-Sep-2023 18:58:42 UTC] PHP Warning: Undefined property: stdClass::$_price in /var/www/wp-site/wp-includes/class-wp-list-util.php on line 192
[20-Sep-2023 18:58:42 UTC] PHP Warning: Undefined property: stdClass::$_price in /var/www/wp-site/wp-includes/class-wp-list-util.php on line 192
[20-Sep-2023 18:58:42 UTC] PHP Warning: Undefined property: stdClass::$_regular_price in /var/www/wp-site/wp-includes/class-wp-list-util.php on line 192
[20-Sep-2023 18:58:42 UTC] PHP Warning: Undefined property: stdClass::$_regular_price in /var/www/wp-site/wp-includes/class-wp-list-util.php on line 192
[20-Sep-2023 18:58:42 UTC] PHP Warning: Undefined property: stdClass::$_sale_price in /var/www/wp-site/wp-includes/class-wp-list-util.php on line 192
[20-Sep-2023 18:58:42 UTC] PHP Warning: Undefined property: stdClass::$_sale_price in /var/www/wp-site/wp-includes/class-wp-list-util.php on line 192
[20-Sep-2023 18:58:42 UTC] PHP Warning: Undefined property: stdClass::$_price in /var/www/wp-site/wp-includes/class-wp-list-util.php on line 192
[20-Sep-2023 18:58:42 UTC] PHP Warning: Undefined property: stdClass::$_price in /var/www/wp-site/wp-includes/class-wp-list-util.php on line 192
[20-Sep-2023 18:58:42 UTC] PHP Warning: Undefined property: stdClass::$_regular_price in /var/www/wp-site/wp-includes/class-wp-list-util.php on line 192
[20-Sep-2023 18:58:42 UTC] PHP Warning: Undefined property: stdClass::$_regular_price in /var/www/wp-site/wp-includes/class-wp-list-util.php on line 192
[20-Sep-2023 18:58:42 UTC] PHP Warning: Undefined property: stdClass::$_sale_price in /var/www/wp-site/wp-includes/class-wp-list-util.php on line 192
[20-Sep-2023 18:58:42 UTC] PHP Warning: Undefined property: stdClass::$_sale_price in /var/www/wp-site/wp-includes/class-wp-list-util.php on line 192
[20-Sep-2023 18:58:42 UTC] PHP Warning: Undefined property: stdClass::$_price in /var/www/wp-site/wp-includes/class-wp-list-util.php on line 192
[20-Sep-2023 18:58:42 UTC] PHP Warning: Undefined property: stdClass::$_price in /var/www/wp-site/wp-includes/class-wp-list-util.php on line 192
```

September 22, 2023 at 7:13 pm #14449097

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

Please go to Plugins->Add new->Commercial tab and check for updates.

Are you able to update to the latest version of WPML ? 4.6.6

If not please go to https://wpml.org/downloads/ and manually download the latest version.

Once done let me know your results, please.

Also, are you able to trigger this error when purchasing a Demo product?

September 25, 2023 at 7:04 am #14454759

runarB-2

Hi

I've updated to 4.6.6, and will check the logs the next few days to see if the issue is resolved. =)

I was unable to trigger this error myself, though my attempts were done after updating from 4.6.5 to 4.6.6.

Best regards, Runar.

September 25, 2023 at 7:13 pm #14461773

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Thanks, Runar, will wait for your updates!

September 28, 2023 at 12:39 pm #14481787

runarB-2

Hi

I'm still getting this error in the log. =/

[28-Sep-2023 11:53:30 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 3 for query SELECT post_id, meta_key, meta_value FROM wp_postmeta
WHERE meta_key IN ('_price', '_regular_price', '_sale_price', '_price_NOK', '_regular_price_NOK', '_sale_price_NOK')
AND post_id IN () 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, KCO_Confirmation->confirm_order, kco_confirm_klarna_order, WC_Order->payment_complete, WC_Order->save, WC_Order->status_transition, do_action('woocommerce_order_status_processing'), WP_Hook->do_action, WP_Hook->apply_filters, wc_update_total_sales_counts, do_action('woocommerce_recorded_sales'), WP_Hook->do_action, WP_Hook->apply_filters, WCML_Synchronize_Product_Data->sync_product_total_sales, WC_Data_Store->__call, WC_Product_Data_Store_CPT->update_product_sales, WC_Data_Store_WP->update_lookup_table, WC_Product_Data_Store_CPT->get_data_for_lookup_table, get_post_meta, get_metadata, get_metadata_raw, apply_filters('get_post_metadata'), WP_Hook->apply_filters, WCML_Multi_Currency_Prices->product_price_filter, WPML\FP\{closure}, call_user_func_array, WPML\FP\Logic::WPML\FP\{closure}, WCML_Multi_Currency_Prices->{closure}, WCML_Custom_Prices->get_product_custom_prices

I'm guessing the error is 'post_id IN ()', since this is probably invalid SQL. Why the post_id is empty though, I do not know...

September 28, 2023 at 9:40 pm #14484801

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi Runar,

Thank you for updating me with the error log!

As this is a syntax error most likely something in the code is triggering it with the version of MySQL used.

Taking a second look again at your MySQL Version I can see you are using 8.0, are you able to as a quick test to drop down to an older version? If you can please let me know your results.

The topic ‘[Closed] Error in your SQL syntax: get_product_custom_prices’ is closed to new replies.