Support » Plugin: WooCommerce » Critical Error since update to version 7.6.0

  • Resolved juliaeme

    (@juliaeme)


    Hi,
    I am creating a website for one of my friends. She wants to integrate a shop, so I decided woocommerce would be the best. (At the moment there is no set up done for woocommerce, I only activated musicplayer for woocommerce on the website.) Unfortunatelly, I updated woocommerce a view days ago to version 7.6.0, since then I am not able to edit my page in the backend. There comes the message “There was a critical error on your website. Please check the inbox of your website administrator email address for further instructions.” But I do not get any message to my admin email address… I followed the woocommerce self service guide: deactivated all plugins, changed the theme to “twenty twenty-three” and only activated woocommerce. The error still exists. I’ve a memory limit of 126M (don’t know if this is important).
    I often had this problem in combination of woocommerce since I started to build the page. But in the past it always helped to deactivate my “updraftPlus” Backup Plugin. But since the latest woocommerce update it totally crashed and nothing works as long as woocommerce is activated.
    Can someone please help me? I am in despair… 🙁
    Thanks a lot
    BR Julia

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi,

    I’ve a memory limit of 126M (don’t know if this is important).

    That’s quite few. try to up to 512Mb. And yes, this important if you have plugins or script which are “memory hungry”.
    However, it would help if you gave us the exact error.

    Best regards

    Thread Starter juliaeme

    (@juliaeme)

    Hi @joy0114

    thanks for yor answer. I activated the debug mode in the wp-config file and it now says the following:

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 184320 bytes) in /home/users/***/www/***/wordpress/wp-includes/class-wpdb.php on line 2431
    
    
    Fatal error: Uncaught Error: Call to undefined function error_log() in /home/users//www//wordpress/wp-includes/class-wpdb.php:1846 
    Stack trace: 
    #0 /home/users//www//wordpress/wp-includes/class-wpdb.php(2372): wpdb->print_error() 
    #1 /home/users//www//wordpress/wp-includes/class-wpdb.php(3018): wpdb->query() 
    #2 /home/users//www//wordpress/wp-includes/option.php(199): wpdb->get_row() 
    #3 /home/users//www//wordpress/wp-includes/option.php(901): get_option() 
    #4 /home/users//www//wordpress/wp-content/plugins/ninjafirewall/lib/utils.php(986): get_transient() 
    #5 /home/users//www//wordpress/wp-includes/class-wp-hook.php(308): nf_check_dbdata() 
    #6 /home/users//www//wordpress/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() 
    #7 /home/users//www//wordpress/wp-includes/plugin.php(517): WP_Hook->do_action() #
    8 /home/users//www//wordpress/wp-includes/load.php(1144): do_action() 
    #9 [internal function]: shutdown_action_hook() 
    #10 {main} thrown in /home/users//www//wordpress/wp-includes/class-wpdb.php on line 1846

    line 2431 in class wp-db.php says: “$this->result = mysqli_query( $this->dbh, $query );”

    After also activating “define( ‘WP_DEBUG_DISPLAY’, true );”, I get these errors in the backend:

    Warning: Undefined array key "comment" in /home/users/***/www/***/wordpress/wp-content/plugins/woocommerce/src/Internal/Admin/Translations.php on line 84
    
    Warning: Trying to access array offset on value of type null in /home/users/***/www/***/wordpress/wp-content/plugins/woocommerce/src/Internal/Admin/Translations.php on line 84
    
    Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home/users/***/www/***/wordpress/wp-content/plugins/woocommerce/src/Internal/Admin/Translations.php on line 88
    
    Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home/users/***/www/***/wordpress/wp-content/plugins/woocommerce/src/Internal/Admin/Translations.php on line 89

    My debug log file has these errors:

    [23-Apr-2023 12:18:28 UTC] PHP Deprecated:  substr(): Passing null to parameter #1 ($string) of type string is deprecated in /home/users/***/www/***/wordpress/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-dashboard-setup.php on line 96
    
    [23-Apr-2023 12:19:10 UTC] PHP Deprecated:  stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home/users/***/www/***/wordpress/wp-content/plugins/music-player-for-woocommerce/pagebuilders/builders.php on line 85
    
    [23-Apr-2023 12:19:11 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function error_log() in /home/users/***/www/***/wordpress/wp-cron.php:129
    
    Stack trace (which is the same as above):
    #0 /home/users/***/www/***/wordpress/wp-includes/class-wpdb.php(2372): wpdb->print_error()
    #1 /home/users/***/www/***/wordpress/wp-includes/class-wpdb.php(3018): wpdb->query()
    #2 /home/users/***/www/***/wordpress/wp-includes/option.php(199): wpdb->get_row()
    #3 /home/users/***/www/***/wordpress/wp-includes/option.php(901): get_option()
    #4 /home/users/***/www/***/wordpress/wp-content/plugins/ninjafirewall/lib/utils.php(986): get_transient()
    #5 /home/users/***/www/***/wordpress/wp-includes/class-wp-hook.php(308): nf_check_dbdata()
    #6 /home/users/***/www/***/wordpress/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    #7 /home/users/***/www/***/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action()
    #8 /home/users/***/www/***/wordpress/wp-includes/load.php(1144): do_action()
    #9 [internal function]: shutdown_action_hook()
    #10 {main}
      thrown in /home/users/***/www/***/wordpress/wp-includes/class-wpdb.php on line 1846

    I know that the host package of my friends website only has 128M PHP memory limit. I need to call the host if its possible to increase that. There was no change in the backend of wordpress at tools > website health, when I changed the value to 512M in the wp-config file. What I can’t understand is why woocommerce in the status tab says “WordPress memory limit 512 MB”. Is this a different memory size than the php memory size?
    At server environement there is no size for the whole php memory listed. I only have:
    PHP post max size: 60MB
    Max upload size: 60 MB.

    Sorry, this is the first website I create with WordPress and I have no experience with woocommerce or server settings.

    Is there any more information you need?

    Thanks a lot!

    BR Julia

    Hi,

    I think you have the explanation here:
    Allowed memory size of 134217728 bytes exhausted

    “WordPress memory limit” is php memory size. At least, Wordress considers that this memory is for “him”.

    As a matter of fact, you only use 128M. That’s not enough.
    Minimum would be 256, and best 512Mb.

    You see in “website health” what you declare in wp-config.php.

    The “truth” is in php.ini
    It would be interesting to see the result of page called whatyouwant.php which contains:

    <?php
        phpinfo();
    ?>

    or :

    <?php
        phpinfo(INFO_VARIABLES);
    ?>

    Best regards

    Hi @juliaeme

    To clarify, did you follow the recommendations provided by @joy0114? Let us know what was the outcome in your case.

    You can check this documentation to increase the memory limit: https://woocommerce.com/document/increasing-the-wordpress-memory-limit/

    Let us know how that goes for you.

    Thread Starter juliaeme

    (@juliaeme)

    Hi @joy0114,
    hi @ihereira ,

    thanks for your fast and successful help in this case and sorry for my late answer. I was on the road, so I couldn’t check your solutions…
    BUT: I had a conversation with the hoster of my friends website. He increased the php memory limit for testing to 256MB and the error was gone 🙂 So it seemed that @joy0114 directly had the right guess!!!
    We will now buy an upgrade for the php memory limit.
    You could not believe how much you helped me… I have a few more gray hairs because of that 🙁
    I am very grateful to you!!!!

    @joy0114, I don’t really know, what I should do with the php.ini. Can you explain it, if I still shall do something here?

    Best regards from a very happy Julia

    joy0114

    (@joy0114)

    Hi Julia,

    I’m glad you were able to find a solution.

    Don’t you worry with php.ini.
    I told you to create a php page containing phpinfo() in order to display what you can specify in php.ini, just for confirming you only use 128M for php memory.

    But, it’s already an effort to get 256M, I’m afraid it will be even more difficult to be allowed to configure your own php.ini …

    Glad to have helped you.
    Best regards

    Roxy

    (@beautyofcode)

    Hi @juliaeme ,

    Really glad to hear that the issue is no longer present!

    I will go ahead and mark this as resolved then – feel free to create a new topic if you need further help 🙂

    Also, if you have a few minutes, we’d love it if you could leave us a review: 

    https://wordpress.org/support/plugin/woocommerce/reviews/

    Cheers!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Critical Error since update to version 7.6.0’ is closed to new replies.