Skip Navigation

[Resolved] Fatal error: Uncaught DivisionByZeroError

This support ticket is created 6 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by Minesh 6 years, 9 months ago.

Assisted by: Minesh.

Author
Posts
#627495

Hello, my site is running on the Siteground server. The site's search function is run by Relevanssi. However, on some searches, the site returns an Uncaught DivisionByZeroError Fatal Error and does not display any output. The complete error output is.

Fatal error: Uncaught DivisionByZeroError: Modulo by zero in /home/bstockit/public_html/OdysseyCases/wp-content/plugins/wp-views/embedded/inc/wpv-pagination-embedded.php:946 Stack trace: #0 /home/bstockit/public_html/OdysseyCases/wp-includes/shortcodes.php(319): WPV_Pagination_Embedded->wpv_pager_nav_links_callback(Array, '', 'wpv-pager-nav-l...') #1 [internal function]: do_shortcode_tag(Array) #2 /home/bstockit/public_html/OdysseyCases/wp-includes/shortcodes.php(197): preg_replace_callback('/\\[(\\[?)(wpv\\-s...', 'do_shortcode_ta...', '\n \n<div style=...') #3 /home/bstockit/public_html/OdysseyCases/wp-content/plugins/wp-views/embedded/inc/wpv-shortcodes.php(7104): do_shortcode('\n \n<div style=...') #4 /home/bstockit/public_html/OdysseyCases/wp-content/plugins/wp-views/embedded/inc/wpv-filter-embedded.php(1671): wpv_do_shortcode('\n \n<div style=...') #5 /home/bstockit/public_html/OdysseyCases/wp-includes/shortcodes.php(319): wpv_items_found('', '\n \n<div style=...', 'wpv-items-found') #6 [internal function]: do_s in /home/bstockit/public_html/OdysseyCases/wp-content/plugins/wp-views/embedded/inc/wpv-pagination-embedded.php on line 946

#627675

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - what exactly the search term you used that is results in the error you shred in your initial post?

I see the error comes from the view's plugin pagination file but In order to minimize the cause of the issue:

Could you please try to resolve your issue by deactivating all third-party plugins as well as the default theme to check for any possible conflicts with any of the plugins or themes?

Do you see same issue with minimum setup (only Toolset plugins and default theme)? If yes:
Could you please share problem URL?

#627860

The fatal error does not occur when I am running a default wordpress theme with Toolset.

I found out Avada with PHP 7 caused the fatal error.

When I switched to Avada with PHP 5.6.34 I got php warnings instead, but the site still displays the correct output.

Warning: Division by zero in /wp-content/plugins/wp-views/embedded/inc/wpv-pagination-embedded.php on line 946

Now, is it Avada's incompatibility with PHP 7 that caused the error or compatibility between Avada and Toolset?

Obviously, something happened in the coding that caused a division by zero in wpv-pagination-embedded.php which in 5.6.34 is a warning and in 7.0 is a fatal error.

Can we make this conversation private?

#628323

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I've removed the full path that might be the problem why you asked to make last replay private.

Well - if it works with default theme that means there is some issue with PHP version and Avada.

Could you please check with them and first confirm that issue is from Toolset or its from Avada. If the issue is from Toolset - we are happy to debug this further.