Viewing 10 replies - 1 through 10 (of 10 total)
  • Same issue here! The plugin was working perfectly fine and then all of a sudden started creating Division by zero error logs.

    Is there still no update for this?

    Any update on this?

    Plugin Author James Koster

    (@jameskoster)

    @montanagrafix

    Could you give me some info on how to recreate this? What have you set for the columns/per page values?

    I’ve tried a bunch of combinations and cannot replicate the issue. My instinct tells me your theme has overwritten a template file somewhere badly.

    Try activating Twenty Twelve or Storefront and let me know if the issue persists.

    Hi @jameskoster,
    I activated the default TwentyFifteen theme and the error still occurred. I have the plugin currently deactivated (so as not to cause issues with the clients live site). I can email you the url of the site if you would like, privately if you would provide me with an email to send it to. Thank you.

    Plugin Author James Koster

    (@jameskoster)

    You forgot to tell me which settings you’ve set ??

    Sorry, in customizing the products archive, I have the following set:

    4 product columns

    10 products per page

    all the other boxes are checked except “display new badge”, “display categroies” and “display stock.”

    Any update coming on this issue? I’m building a theme with WooCommerce support, and getting the same error message.

    Just installed this and immediately have division by zero errors. I guess I’ll skip this one unless someone can point me in the right direction for a fix?

    (I am using beaver builder, if that matters)

    If it helps, here’s the errors I get:

    Warning: Division by zero in /Library/WebServer/Documents/Sites/WordPressWoo/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 250
    
    Warning: Division by zero in /Library/WebServer/Documents/Sites/WordPressWoo/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 252

    In both cases, the dividend is

    $woocommerce_loop['columns']

    which is empty, causing the divide by zero.

    Looks like it’s getting set in line 248:

    $woocommerce_loop['columns'] = ! empty( $woocommerce_loop['columns'] ) ? $woocommerce_loop['columns'] : apply_filters( 'loop_shop_columns', 4 );

    apply_filters( 'loop_shop_columns', 4 ) is returning an empty string, and that’s getting called since $woocommerce_loop['columns'] is empty.

    I’m using WP 4.5.3, WooCommerce 2.6.2, and TwentySixteen theme. All other plugins are deactivated (other than WooCommerce Product Archive Customiser, obviously ??

    Once I deactivate WooCommerce Product Archive Customiser, then errors go away.

    I am also getting this issue as soon as I activate the plugin. I’ve deactivated the plugin for now and hope this issue can be resolved quickly.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Division by zero error’ is closed to new replies.