'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:

  1. Open the following files

    /enc/pagelist_bar.php
    /enc/pagelist_tabs.php
  2. In both files, find the line:

    $pagenum = mysql_num_rows($pageresult);
  3. Just under that line, add the code:

    if($pagenum>0)
    {
  4. Again in both files, find the line:

    echo "";
  5. Just under that line, add the code:

    }
  6. Save and re-upload the files.