On several archive views, I am getting the following php error:
Warning: Division by zero in /home/carlprit/public_html/carlpritchard.com/wp-content/plugins/wp-views/embedded/inc/wpv.class.php 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.
https://toolset.com/faq/provide-supporters-copy-site/
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.