Jon W
Well-known member
Sorry to drop my first reported bug on release date (instead of when you had time to fix it before release date)...
When viewing all resources (i.e., latest, most downloaded, etc.), the total number of resources is calculated from the cached category counts, which do not include deleted/unapproved resources:
As such, if you have lots of deleted/unapproved resources (or even if you have 1 deleted/unapproved resource in a category with 21 resources), you may not be able to view all the resources without looking through all categories.
To make matters worse, unless every single resource has been deleted/unapproved (unlikely), you can't even try to access the hidden pages by adding ?page=2 etc., because the URL is canonicalised:
so you end up being bounced back to what it thinks is the last page.
When viewing all resources (i.e., latest, most downloaded, etc.), the total number of resources is calculated from the cached category counts, which do not include deleted/unapproved resources:
PHP:
$totalResources = 0;
foreach ($categories AS $category)
{
$totalResources += $category['resource_count'];
}
As such, if you have lots of deleted/unapproved resources (or even if you have 1 deleted/unapproved resource in a category with 21 resources), you may not be able to view all the resources without looking through all categories.
To make matters worse, unless every single resource has been deleted/unapproved (unlikely), you can't even try to access the hidden pages by adding ?page=2 etc., because the URL is canonicalised:
PHP:
$this->canonicalizePageNumber($page, $perPage, $totalResources, 'resources');