• Resolved Luismin

    (@luismin)


    Hello!

    I need help to solve a problem with a website. Basically, the problem is the slowness of it and the consumption of resources that it produces in the hosting.

    I have detected that the main problem is Woocommerce. I have checked the logs and the most repeated is this:

    2023-07-27T13:46:43+00:00 CRITICAL Uncaught TypeError: Unsupported operand types: string + int in /wp-includes/cron.php:855
    Stack trace: 0 /wp-includes/cron.php(1002): spawn_cron() 1 /wp-includes/class-wp-hook.php(308): _wp_cron() 2 /wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() 3 /wp-includes/plugin.php(517): WP_Hook->do_action() 4 /wp-settings.php(645): do_action() 5 /wp-config.php(81): require_once(‘/home/ordenstu/…’) 6 /wp-load.php(50): require_once(‘/home/ordenstu/…’) 7 wp-blog-header.php(13): require_once(‘/home/ordenstu/…’) 8 /index.php(17): require(‘/home/ordenstu/…’) 9 {main}

    thrown en /wp-includes/cron.php en la línea 855

    2023-07-13T13:18:24+00:00 CRITICAL Uncaught WC_Data_Exception in /wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:900
    Stack trace: 0 /wp-content/plugins/woocommerce/src/Admin/Notes/Note.php(645): WC_Data->error(‘admin_note_inva…’, ”) 1 /wp-content/plugins/woocommerce/src/Internal/Admin/Notes/CouponPageMoved.php(86): Automattic\WooCommerce\Admin\Notes\Note->add_action(‘remove-legacy-c…’, ”, ‘https://www.lae…’, ‘actioned’) 2 /wp-content/plugins/woocommerce/src/Admin/Notes/NoteTraits.php(83): Automattic\WooCommerce\Internal\Admin\Notes\CouponPageMoved::get_note() 3 /wp-includes/class-wp-hook.php(308): Automattic\WooCommerce\Internal\Admin\Notes\CouponPageMoved::possibly_add_note(”) 4 /wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) 5 /wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php en la línea 900

    I have duplicated the web a test server and I discard problems of php version, theme (since when I deactivate Woocommerce the web becomes agile).

    Any ideas?

    Thank you very much!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @luismin

    From the error logs you have shared, it appears that there are two main issues. The first one is related to a TypeError in the WordPress cron file, and the second one is a WC_Data_Exception in WooCommerce.

    For the first issue, the TypeError in cron.php, it seems like an operation is trying to add a string and an integer. This could be a plugin or theme function incorrectly interacting with the WordPress cron system. Although you have mentioned that the issue persists even when you deactivate WooCommerce, it’s possible that other plugins or the theme might be causing this.

    For the second issue, the WC_Data_Exception, it appears to be related to an admin note in WooCommerce. This is possibly due to a change in the coupon page location. This is a known issue in some versions of WooCommerce and is usually resolved by updating to the latest version.

    In order to troubleshoot these issues, I would suggest the following steps:

    1. Ensure that your WooCommerce plugin, theme, and other plugins are updated to their latest versions.
    2. Try deactivating all other plugins except WooCommerce to see if the issue persists. If the issue is resolved, reactivate the plugins one by one to find out which one is causing the problem. You can find a more detailed explanation of conducting a conflict test here.
    3. Switch your theme to a default WordPress theme like Storefront. If the issue is resolved, the problem might be with your current theme.
    4. Check your server’s PHP version. WooCommerce recommends a PHP version of 7.4 or greater for optimal performance.

    If none of these steps resolve your issue, we will need more specific details about your hosting environment and WooCommerce setup to provide further assistance. Please can you share a copy of the following:

    • System Status Report: navigate to WooCommerce → Status. Select Get system report and then Copy for support.
    • Fatal Error log: Share a copy of any fatal error log found under WooCommerce → Status → Logs.

    You could copy and paste your reply or share it via https://pastebin.com/ and send the link here. This will help us investigate further and provide you with a more accurate solution.

    We appreciate your patience and look forward to resolving this issue for you.

    Thanks!

    Thread Starter Luismin

    (@luismin)

    Hi @shameemreza , thanks for your reply. I will reply in bold about your points ??

    1. Ensure that your WooCommerce plugin, theme, and other plugins are updated to their latest versions: Everything is updated
    2. Try deactivating all other plugins except WooCommerce to see if the issue persists. If the issue is resolved, reactivate the plugins one by one to find out which one is causing the problem. You can find a more detailed explanation of conducting a conflict test here. If I deactivate Woocommerce everything works well.
    3. Switch your theme to a default WordPress theme like Storefront. If the issue is resolved, the problem might be with your current theme: Nope, chaning the theme does not resolve the problem
    4. Check your server’s PHP version. WooCommerce recommends a PHP version of 7.4 or greater for optimal performance. I tried to set up in a greater version but still the same

    WOOCOMMERCE STATUS

    https://pastebin.com/embed_iframe/r6QnLZnD

    FATAL ERROR LOGS

    • 2023-07-13T13:18:24+00:00 CRITICAL Uncaught WC_Data_Exception in /wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:900
      Stack trace: 0 /wp-content/plugins/woocommerce/src/Admin/Notes/Note.php(645): WC_Data->error(‘admin_note_inva…’, ”) 1 /wp-content/plugins/woocommerce/src/Internal/Admin/Notes/CouponPageMoved.php(86): Automattic\WooCommerce\Admin\Notes\Note->add_action(‘remove-legacy-c…’, ”, ‘https://www.lae…’, ‘actioned’) 2 /wp-content/plugins/woocommerce/src/Admin/Notes/NoteTraits.php(83): Automattic\WooCommerce\Internal\Admin\Notes\CouponPageMoved::get_note() 3 /wp-includes/class-wp-hook.php(308): Automattic\WooCommerce\Internal\Admin\Notes\CouponPageMoved::possibly_add_note(”) 4 /wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) 5 /wp- en /wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php en la línea 900
    • 2023-07-27T19:54:05+00:00 CRITICAL Uncaught TypeError: Unsupported operand types: string + int in /wp-includes/cron.php:855
    • (The most repetead)Stack trace: 0 /wp-includes/cron.php(1002): spawn_cron() 1 /wp-includes/class-wp-hook.php(308): _wp_cron() 2 /wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() 3 /wp-includes/plugin.php(517): WP_Hook->do_action() 4 /wp-settings.php(645): do_action() 5 /wp-config.php(81): require_once(‘/home/ordenstu/…’) 6 /wp-load.php(50): require_once(‘/home/ordenstu/…’) 7 /wp-blog-header.php(13): require_once(‘/home/ordenstu/…’) 8 /index.php(17): require(‘/home/ordenstu/…’) 9 {main}
    • thrown en /wp-includes/cron.php en la línea 855

    Thank you so much for your help

    • This reply was modified 1 year, 7 months ago by Luismin.
    Plugin Support nicw.a11n

    (@nicw)

    Hi @luismin

    Thank you for the update. It appears that the error is occurring when your WP_CRON_LOCK_TIMEOUT is calculated. This value needs to be an integer rather than a string. Have you defined this anywhere in your site or wp-config.php file?

    It should be

    define( 'CRON_LOCK_TIMEOUT', 60 );

    Not

    define( 'CRON_LOCK_TIMEOUT', '60' );

    There is also a slight discrepancy in the error – line 855 of /wp-includes/cron.php is actually blank in v6.3 of WordPress, which is the version reported in your system status report, so I’m working on the assumption that the log comes from before your update to 6.3.

    Regarding the admin note coupon menu issue, have you actioned the removal of the coupon menu or not? And was it successfully removed? Once confirmed, we’ll be able to assist further with this error.

    Thread Starter Luismin

    (@luismin)

    Hi @nicw ,

    I have opened my wp-config.php but there is no trace of the line you mention, should I add it?

    On the other hand, I’m not sure what I have to do with “have you actioned the removal of the coupon menu or not? How do I do it?

    This is the webiste -> https://www.laescueladelorden.com

    Thank you very much in advance.

    • This reply was modified 1 year, 7 months ago by Luismin.

    Howdy ??

    If the constant and value aren’t defined in wp-config.php it must be defined somewhere else. I don’t believe adding it there would help, but rather finding where it’s defined as a string instead of an integer. You might have luck using the String Locator plugin to search the site code base for CRON_LOCK_TIMEOUT to find where it’s defined.

    To action coupon menu, you would press the button to remove the legacy coupon menu.

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

    Thread Starter Luismin

    (@luismin)

    Hi guys,

    Sorry about my late reply. After install Disable Bloat for WordPress & WooCommerce plugin, all works well… Speed problem and errors disappear ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Slow Site – Fatal errors Cron.php’ is closed to new replies.