• Resolved David

    (@loano1)


    HI, after updating to the latest version, my error log gets filled with a warning and a database error:

    PHP Warning: Undefined property: wpdb::$wc_orders in /var/www/vhosts/example.com/httpdocs/wp-includes/class-wpdb.php on line 783

    WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE payment_method = 'ppec_paypal'' at line 1 for query SELECT 1 FROM WHERE payment_method = 'ppec_paypal' made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('plugins_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, WooCommerce\PayPalCommerce{closure}, WooCommerce\PayPalCommerce\init, {closure}, WooCommerce\PayPalCommerce\Compat\CompatModule->run, WooCommerce\PayPalCommerce\Compat\CompatModule->initialize_ppec_compat_layer, WooCommerce\PayPalCommerce\Compat\PPEC\SubscriptionsHandler->maybe_hook, WooCommerce\PayPalCommerce\Compat\PPEC\PPECHelper::use_ppec_compat_layer_for_subscriptions, WooCommerce\PayPalCommerce\Compat\PPEC\PPECHelper::site_has_ppec_subscriptions

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter David

    (@loano1)

    After switching from

    High-performance order storage (recommended)

    to

    WordPress posts storage (legacy)

    the error disappeard. However, it would be good if this update would be compatible with the new tables as well.

    en mi página después del alta actualización de la última versión, me da error al colocar productos al carrito y las categorías de producto y la página de productos da error cuando le doy click la página se desconfigura, será puedo que hacer algo como lo que tú hiciste si me puedes ayudar te lo agradecería la tienda es

    https://www.ytsmed.com

    Hi @loano1,

    after updating to the latest version, my error log gets filled with a warning and a database error: After switching from High-performance order storage (recommended) to?WordPress posts storage (legacy)?the error disappeard. However, it would be good if this update would be compatible with the new tables as well.

    From what I understand, you’re encountering a database error and PHP warning on your site after updating to the latest version of WooCommerce. The error log suggests there’s an issue with the SQL syntax in your MariaDB server, specifically related to the ‘ppec_paypal’ payment method.

    You’ve also mentioned that switching from High-performance order storage to WordPress posts storage (legacy) seems to have resolved the issue. However, you’d like the update to be compatible with the new tables as well.

    Here are some potential solutions:

    1. Update your plugins and themes: Make sure all your plugins, themes, and WordPress are current. Outdated versions can sometimes cause issues.
    2. Plugin Conflict: Please verify if there’s a conflict with another plugin. Deactivate all other plugins except WooCommerce and see if the error persists. If it doesn’t, reactivate the plugins one by one to identify the conflicting plugins.
    3. Theme Conflict: Try switching to a default WordPress theme like Storefront to check if your theme is causing the issue. Here’s a handy guide on testing for conflicts: ?? How to Test for Plugin and Theme Conflicts.
    4. Database Optimization: Optimize your database using a plugin like WP-Optimize. This can often resolve database-related issues.
    5. Enable Debugging: If the issue is still there, turning on debugging in WordPress might help us find the problem. Just add these lines to your wp-config.php file:
    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );
    @ini_set( 'display_errors', 0 );

    This will create a debug.log file in your wp-content directory, logging any PHP errors or notices. For a more detailed guide on enabling debugging in WordPress, you can visit this link: ?? Debugging in WordPress.

    If the issue continues after trying these steps, please share more details, like the exact error messages you see when debug mode is on. This will help us identify and solve the problem more effectively.

    We’d also appreciate it if you could share your site’s System Status report. This will help us understand your site’s setup better and identify the problem. You can find it via WooCommerce > Status. Select Get system report and then Copy for support.

    Once you have all this information, you can paste it inside a Code block in your reply, or use https://pastebin.com to paste it and share the link with us.

    Thanks for your patience and cooperation in this matter! We’re here to help you get this sorted.

    Hi @ytsmed,

    on my page after the update of the latest version, I get an error when placing products in the cart and the product categories and the product page gives an error when I click on it the page is deconfigured, can I do something like what you

    From what I understand, you’re encountering an error on your website https://www.ytsmed.com after updating to the latest version of WooCommerce. Specifically, you mentioned experiencing issues when adding products to the cart and accessing product categories and product pages.

    Given that each site setup is unique, and to ensure we adhere to our ?? forum’s best practices, could you kindly initiate a ?? new topic in our support forum? This approach helps us zero in on your specific issue and allows other users facing a similar problem to easily find and benefit from the discussion.

    In your new topic, could you please provide as much detail as possible? This might include screenshots, error messages, the steps you’ve already taken to try to resolve the issue, and any other information you think might be relevant.

    You can use https://snipboard.io to share screenshots. Just follow the instructions on the page and paste the URL in your reply.

    Thank you for your understanding and cooperation. We look forward to assisting you further on the new topic.

    Thread Starter David

    (@loano1)

    Hi @bisratlearn

    Please pass this topic on to the developers and please don’t just paste this standard ChatGPT answer everywhere, thanks

    Hey @loano1,

    After switching from

    High-performance order storage (recommended)

    to

    WordPress posts storage (legacy)

    the error disappeard. However, it would be good if this update would be compatible with the new tables as well.

    Hmm, this is interesting. I have tried to reproduce this on my test site without success. Although I see similar errors with the PayPal Payments plugin, the nature of the errors differ.

    I have tried disabling and then re-enabling HPOS to see if new/more recent errors would be logged but no luck.

    I’d like to take a closer look at your sites current environment, to see if I’m able to replicate this. Please can you share a copy of your sites System Status Report which you can find via WooCommerce?→?Status.

    Select?Get system report?and then?Download for Support. This will download a TXT file that has the contents of the SSR which you can then share with us here.

    Cheers!

    Ross

    (@rmdglasgow)

    I can also confirm I’m getting the same error on HPOS.

    Hi @rmdglasgow

    Thanks for reaching out!

    I understand you are experiencing the same issue and since every site is different and you’re not the person who originally started this topic then, per the forum guidelines, would you please start your own topic?

    Additionally, please include your System Status Report that you can find via WooCommerce > Status. Select Get system report and then Copy for support.

    If you could also provide the fatal error logs (if any) under WooCommerce > Status > Logs.

    Once you’ve created a new forum topic, you can include the contents of your SSR and logs within your message on that forum topic.

    2We’ll be more than happy to help there ??

    Howdy @loano1,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if you need any further help with this.

    Cheers!

    FYI: I am also experiencing this issue. Clearly a WooCommerce PayPal issue (woocommerce-paypal-payments).

    The function site_has_ppec_subscriptions is using a HPOS-incompatible $wpdb->wc_orders

    [09-Jan-2024 02:43:50 UTC] PHP Warning:  Undefined property: wpdb::$wc_orders in /XXX/wp-includes/class-wpdb.php on line 783
    [09-Jan-2024 02:43:50 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE payment_method = 'ppec_paypal'' at line 1 for query SELECT 1 FROM  WHERE payment_method = 'ppec_paypal' made by require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('plugins_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, WooCommerce\PayPalCommerce\{closure}, WooCommerce\PayPalCommerce\init, {closure}, WooCommerce\PayPalCommerce\Compat\CompatModule->run, WooCommerce\PayPalCommerce\Compat\CompatModule->initialize_ppec_compat_layer, WooCommerce\PayPalCommerce\Compat\PPEC\SubscriptionsHandler->maybe_hook, WooCommerce\PayPalCommerce\Compat\PPEC\PPECHelper::use_ppec_compat_layer_for_subscriptions, WooCommerce\PayPalCommerce\Compat\PPEC\PPECHelper::site_has_ppec_subscriptions

    Hello @probertson,

    I suggest that you start a new thread with your case, so that we don’t mix several troubleshooting sessions in one thread.

    Even if the symptoms are the same, perhaps the underlying problem is different in your case.

    Thanks!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Database error after updating to the latest version.’ is closed to new replies.