• Resolved thewebmonk

    (@thewebmonk)


    Hi,

    I have these in my File Manager Error Log, what is wrong and how can I fix it?

    Thank you very much!!

    [13-Jan-2025 22:13:09 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 ‘(ORDER BY post_date_gmt) AS order_rank, post_date_gmt AS order_created_at, ‘ at line 3 for query SELECT ID AS id, row_number() OVER (ORDER BY post_date_gmt) AS order_rank, post_date_gmt AS order_created_at, post_modified_gmt AS order_updated_at FROM xCJ_posts WHERE post_type = ‘shop_order’ AND post_status IN (‘wc-completed’, ‘wc-refunded’) ORDER BY post_date_gmt ASC LIMIT 20; made by do_action_ref_array(‘woocommerce_tracker_send_event’), WP_Hook->do_action, WP_Hook->apply_filters, WC_Tracker::send_tracking_data, WC_Tracker::get_tracking_data, WC_Tracker::get_order_snapshot, WC_Tracker::get_order_data

    [13-Jan-2025 22:13:09 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 ‘(ORDER BY post_date_gmt) AS order_rank, post_date_gmt AS order_created_at, ‘ at line 3 for query SELECT ID AS id, row_number() OVER (ORDER BY post_date_gmt) AS order_rank, post_date_gmt AS order_created_at, post_modified_gmt AS order_updated_at FROM xCJ_posts WHERE post_type = ‘shop_order’ AND post_status IN (‘wc-completed’, ‘wc-refunded’) ORDER BY post_date_gmt DESC LIMIT 20; made by do_action_ref_array(‘woocommerce_tracker_send_event’), WP_Hook->do_action, WP_Hook->apply_filters, WC_Tracker::send_tracking_data, WC_Tracker::get_tracking_data, WC_Tracker::get_order_snapshot, WC_Tracker::get_order_data

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Moses M. (woo-hc)

    (@mosesmedh)

    Hi @thewebmonk,

    It looks like there is an issue with your database. To resolve this, ensure that both your WooCommerce and WordPress installations are up to date. Additionally, check that your MySQL version supports window functions like ROW_NUMBER(). If you’re unsure, your web hosting provider can assist with this.

    You can also repair your database by adding the following line to your wp-config.php file:

    define('WP_ALLOW_REPAIR', true);
    

    Then, visit this URL: https://yoursite.com/wp-admin/maint/repair.php.

    Make sure to replace yoursite.com with your site’s domain, subdomain, or the directory URL leading to your homepage.

    It is important to take a backup of your website before you attempt this procedure.

    Thread Starter thewebmonk

    (@thewebmonk)

    Hello Moses,

    thank you for your reply.

    I had the Hosting Assistance help me fix the database errors, they said everything was fine after their work.

    But after 2 days, I see the following errors in the Error_log, not sure if it’s related to the previous or something new? Also, I cannot understand if it’s WooCommerce and/or WPML..

    Thank you again!

    [ DELETED FOUR HUNDRED, FIFTYONE THOUSAND AND FOUR HUNDRED AND EIGHTY CHARACTERS. ]

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @thewebmonk STOP. Do not paste that again. It just ruins the topic formatting and makes it impossible to get anything useful out of it.

    Please do not post large code or responses like that here, it doesn’t work after ~10 lines or so.

    If you need share that data please use https://gist.github.com/ or https://pastebin.com/ or the like instead and post the link to that paste.

    Thread Starter thewebmonk

    (@thewebmonk)

    I apologize!

    Duly noted, here is the link with the code https://pastebin.com/pMnHmB5z

    Thank you

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello thewebmonk,

    Thank you for your reply.

    I have reviewed the error log you shared.
    The error appears to be caused by database queries related to the WPML plugin.

    To confirm, delete the existing error log and disable the WPML plugin. Then, visit your website’s front end and WP Admin to see if new error logs are generated. If new logs are created, check whether they show the same errors or different ones.

    Let me know what you find. ??

    Best regards.

    Thread Starter thewebmonk

    (@thewebmonk)

    Hello Zubair,

    thank you for your reply. Before I proceed I just want to be sure:

    1)do I risk my website breaking if I disable the WPML?

    1)once I re-enable it after the test, will I find everything exactly as before or do I need to take screenshots of the settings before to re-enter them later?

    Thank you!!

    Plugin Support Mahfuzur Rahman(woo-hc)

    (@mahfuzurwp)

    Hi @thewebmonk ,

    Disabling WPML temporarily may cause pages translated using WPML to break, as the translations rely on the plugin to function properly. However, once you re-enable WPML, your settings and translations should remain intact.

    To be extra safe, I recommend backing up your site and optionally taking screenshots of your WPML settings before proceeding.

    Let me know what you find.

    Plugin Support Feten L. a11n

    (@fetenlakhal)

    Hi,

    Just checking in—since there’s been no response, I’ll mark this as resolved for now. If you need any further assistance, we’re always here to help.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.