Ok, we found the problem in the trigger_download function in the download-manager/src/__/Apply.php file
This is the change we made:
global $wpdb, $current_user, $wp_query;
if ( preg_match( “/\/download\/([\d]+)\/(.+)\/(.*)/”, $_SERVER[‘REQUEST_URI’], $matched ) && !empty($_GET[‘filename’]) ) {
$_REQUEST[‘wpdmdl’] = $_GET[‘wpdmdl’] = (int) $matched[1];
$_REQUEST[‘ind’] = $_GET[‘ind’] = (int) $matched[2];
$wp_query->query_vars[‘wpdmdl’] = (int) $matched[1];
$wp_query->query_vars[‘ind’] = (int) $matched[2];
}
else if ( preg_match( “/\/download\/([\d]+)\/(.*)/”, $_SERVER[‘REQUEST_URI’], $matched ) && !empty($_GET[‘filename’]) ) {
$_REQUEST[‘wpdmdl’] = $_GET[‘wpdmdl’] = (int) $matched[1];
$wp_query->query_vars[‘wpdmdl’] = (int) $matched[1];
}
In this way, if the Download content type only has a number in the URL, the download is not forced (which was wrong anyway because it took the URL as if it were the file ID), but displays the content and allows download individual files.
Now, with this change, we have solved the problem, can you implement it in the next version of the plugin?
Thanks.