Forum Replies Created
Hi,
I have in my previous post at Mar 3, 2026 at 9:07 pm 🙂
Hi,
Yes I believe they’ll have the same issue as we had.
Will this be merged? Else the next update will wipe it.
Hi, yes it works. I believe anyone hosting on WordPress.com or who uses memcache will need this.
I have a fix for anyone else with this issue! It seems to only happen if you have memache such as when hosting on WP.com. Here’s what I had to do:
Fix #1: Missing posts_per_page Parameter
File: download-manager.php
Add:
<?php
// Fix for missing posts_per_page parameter
add_filter('wpdm_packages_query_params', function($params) {
if (!isset($params['posts_per_page'])) {
$params['posts_per_page'] = 10;
}
return $params;
}, 999);
What it does: Ensures WP_Query always receives a posts_per_page parameter. When pagination/sorting is active, this parameter was missing for me, causing WP_Query to return incorrect results (I verified this with console logs).
Fix #2: WordPress.com Caching Bug with found_posts
File: __/Query.php inserted at line 415
Insert:
<?php
// Fix for WordPress.com caching issue: if found_posts is 0 but we have posts, recalculate
if ($this->result->found_posts == 0 && !empty($this->result->posts)) {
// Run a separate count query to get accurate total
$count_params = $this->params;
unset($count_params['paged']);
unset($count_params['posts_per_page']);
$count_params['fields'] = 'ids';
$count_params['posts_per_page'] = -1;
$count_params['no_found_rows'] = true;
$count_query = new \WP_Query($count_params);
$this->count = $count_query->post_count;
} else {
$this->count = $this->result->found_posts;
}
What it does: Detects when WordPress.com’s object cache incorrectly returns found_posts=0 despite WP_Query returning actual posts. Runs a separate count query to get the accurate total, preventing the “No downloads found!” message from displaying and ensuring pagination shows all pages correctly.
Also this page is not showing any package for me https://free.wpdm.online/packages-block-check/
It just says “Packages Block Check”.
I’ve actually already tried that. I went back to the built in theme and had the same results. Would it help if I gave you a ‘paid account’ on our live site so you can see it for yourself there?