Hi WPDM team,
I’m writing to report an interaction between WordPress Download Manager (WPDM) and the Rara Business theme that consistently crashes WPDM single package pages. I’ve included the environment details, the reproducible error, and the workaround we implemented.
Environment
WordPress: 6.6.2
PHP: 8.2 (running on WHC / cPanel with zlib compression enabled)
WPDM: 3.2.99 (Free)
Theme: Rara Business (latest from WordPress.org, v1.2.9)
Hosting: Linux/Apache with Cloudflare in front
Permalink base for WPDM packages: /files/<slug>/
Problem description
After switching the WPDM package permalink base to /files/, visiting a package single page at /files/<package-slug>/ triggers a fatal error.
Stack trace excerpt:
PHP Fatal error: Uncaught TypeError: explode(): Argument #2 ($string) must be of type string, WP_Error given
in /wp-content/themes/rara-business/inc/template-functions.php:433
#0 /…/template-functions.php(231): rara_business_breadcrumb()
#1 /wp-includes/class-wp-hook.php(324): rara_business_content_start(”)
#2 /wp-includes/plugin.php(517): WP_Hook->do_action()
#3 /wp-content/themes/rara-business/header.php(59): do_action(‘rara_business_content’)
#4 /wp-content/themes/rara-business/single.php(12): get_header()
Root cause:
The theme’s rara_business_content_start() calls rara_business_breadcrumb(), which assumes a post category context. On WPDM singles (custom post type wpdmpro), it receives a WP_Error. This value is passed directly into explode(), producing the fatal.
What we tried
Switched to Twenty Twenty-Five → WPDM singles load normally.
Disabled all MU plugins and caching layers → crash persists with Rara Business.
Built a child theme to gate the do_action( ‘rara_business_content’ ) call → functional but brittle and caused styling regressions.
Minimal, upgrade-safe workaround
We developed a compatibility plugin (wpdm-rara-compat.php) that:
Removes the theme’s content-start callback from the rara_business_content hook.
Re-adds it with a guard so it runs everywhere except on WPDM singles.
Restores normal page layout on WPDM singles by injecting wrapper markup (container/row/content/sidebar) around the_content and aligning the page title.
Plugin code:
<?php
/**
* Plugin Name: WPDM × Rara Business Compat
* Description: Prevents Rara breadcrumb crash on WPDM singles, restores layout.
* Version: 1.0
*/
add_action(‘after_setup_theme’, function () {
// Remove theme’s content-start callback
remove_action(‘rara_business_content’, ‘rara_business_content_start’, 10);
// Re-add guarded callback
add_action(‘rara_business_content’, function () {
if ( is_singular([‘wpdmpro’,’wpdm_package’]) ) return;
if ( function_exists(‘rara_business_content_start’) ) {
rara_business_content_start();
}
}, 10);
}, 99);
// === Layout wrapper for WPDM singles ===
add_filter(‘the_content’, function ($html) {
if (!is_singular(‘wpdmpro’) || !in_the_loop() || !is_main_query()) return $html;
// Prevent double wrapping
if (str_contains($html, ‘class=”site-content single-wpdmpro”‘)) return $html;
ob_start(); get_sidebar(); $sidebar = ob_get_clean();
return
‘<div id=”content” class=”site-content single-wpdmpro”>’ .
‘<div class=”container”><div class=”row”>’ .
‘<main id=”primary” class=”content-area col-lg-8″><div class=”site-main”>’ .
$html .
‘</div></main>’ .
$sidebar .
‘</div></div>’ .
‘</div>’;
}, 20);
// Align WPDM single title with content column
add_filter(‘the_title’, function ($title, $post_id) {
if (is_admin() || !is_singular(‘wpdmpro’) || !in_the_loop() || !is_main_query()) return $title;
if ((int)$post_id !== (int)get_queried_object_id()) return $title;
if (strpos($title, ‘wpdm-title-wrap’) !== false) return $title;
return ‘<div class=”container”><div class=”row”><div class=”col-lg-8 wpdm-title-wrap”>’ .
$title .
‘</div></div></div>’;
}, 10, 2);
Current status
WPDM singles now load correctly at /download/<slug>/. Example: https://complianceinsight.ca/download/press-release-2025-09-02/
Site styling restored (title + content aligned with container/row).
No more fatals. Logs show only benign PHP 8.2 notices from the theme’s Customizer notice class (Deprecated: Creation of dynamic property …).
Suggestions
WPDM resilience: Adding a defensive check around breadcrumb/taxonomy lookups for custom post types would help WPDM work out-of-the-box with themes that assume posts/categories.
Theme interaction doc: A short WPDM doc page on “Theme compatibility” (especially around breadcrumb hooks) would help other users avoid this.
Optional hook: A dedicated filter to let developers wrap WPDM singles in their theme’s grid without intercepting the_content would simplify compatibility work.
Happy to provide a staging URL or further debug info if you’d like to see the exact crash path in action.
Thanks for your continued work on WPDM—outside this theme-specific issue, the plugin has been solid.
Good morning, I need to know if it’s possible to do this. I need to create a restricted area with about a thousand products inside. To speed up the upload process, I’d like to start by manually creating all the categories and tags. Then, I’d upload just one product and export it to a CSV file using the appropriate add-on. At that point, I’d manually modify the CSV file by adding rows for all the products, including their URLs, names, categories, tags, etc.
Do you think it’s possible to populate the database this way?
Hey Support Team,
Our client notified us that some of the companies they work with does not allow the PDF to display because of Download Manager parameters. Here’s what they found:
“The PDF is correctly hosted on your site. Note how the URL doesn’t have the blocked Google Docs URL path: https://actenergy.com/download/act-energy-technologies-reports-2025-q1-interim-results/?wpdmdl=1594&refresh=6835d9501e1cd1748359504. It looks like currently being served through a download manager plugin that adds dynamic parameters to the URL (e.g.,?wpdmdl=…&refresh=…).
Some corporate firewalls flag this kind of link as a potential online storage or file-sharing service, and automatically block access for security reasons.”
Here’s a screenshot:
We were hoping there was a work-around to this since it seems like a major issue – otherwise we may need to remove the plugin which isn’t really something we want to do.
Thank you for your assistance,
FBC
Hi,
could you add global redirect after login label in settings?
‘casue now the only way to set redirection URL is in the gutenberg block (which doesn’t work by the way) or shortcode.
This is illogical and weak for UX-configuration.