Skip Navigation

[Gelöst] Division by zero error related to posts per page setting

This support ticket is created vor 5 Jahre, 6 Monate. 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 3 Antworten, has 2 Stimmen.

Last updated by ashleighP vor 5 Jahre, 6 Monate.

Assigned support staff: Beda.


On several archive views, I am getting the following php error:

Warning: Division by zero in /home/carlprit/public_html/ on line 3198

Referring to:

$posts_per_page = $view_settings['pagination']['posts_per_page'];
$this->taxonomy_data['max_num_pages'] = ceil( $this->taxonomy_data['item_count'] / $posts_per_page );

So it seems it's pulling 0 as the posts_per_page setting, even though none of the views affected have 0 set at the posts_per_page.

Affected pages:
hidden link & hidden link (these two use the same archive view) are set to have no pagination

hidden link is set to have 10 posts per page, which is what the page loads.


Replacing the blog view seems to have fixed that one, but the issue persists on hidden link & hidden link


I can't replicate this issue, and I see there is some confusion.

1. WordPress Archive Views are just Archives. They are edited under Toolset > WordPress Archives
2. Views are lists of any post Type on your Website, with custom queries and Custom Searches.
Those are edited in Toolset > Views.

Which one of both is the issue?

I suggest you send me a copy of your site straight away, unless you can list exact steps on how to replicate the issue, as locally, Views and Archives both work fine.

But I perhaps miss a crucial setting.

Hence a copy of your site will help me to see the issue, following your instructions that you will provide, and then solve it for you.

Thanks you!


The issue appears to be resolved. As I haven't done anything since I posted, I'm assuming it was related to the siteground caching.

I used "archive view" to differentiate that it was an archive that I had customized using Views.