'Warning: Division by zero' error when using PAGES_TABS or PAGES_BAR navigation types
If you are using %PAGES_TABS% or %PAGES_BAR% navigation types (or %PAGES_TABS_X% or %PAGES_BAR_X% where X is a Page Group), and you do not have any pages in that navigation, you will receive an error that reads "Warning: Division by zero...". This error will be corrected in the next release. For now, you may fix the error by following the instructions below:
-
Open the following files
/enc/pagelist_bar.php
/enc/pagelist_tabs.php
-
In both files, find the line:
$pagenum = mysql_num_rows($pageresult);
-
Just under that line, add the code:
if($pagenum>0) { -
Again in both files, find the line:
echo "";
-
Just under that line, add the code:
}
-
Save and re-upload the files.