Aug 20
Divi Supreme (Divi 5) – Fatal error et_core_is_fb_enabled() breaks WP-CLI and prevents Redis activation
Hi!! This is a bug report redacted with ChatGPT, so I really don't know if the suggestion is 100% accurate. The issue IS 100% accurate, though, you can see my error log:
There is a fatal error in Supreme Modules Pro for Divi (Divi 5 integration) that occurs when WordPress runs through WP-CLI or during server-side tasks (such as enabling Redis Object Cache).
The plugin calls et_core_is_fb_enabled() inside divi-supreme.php without checking whether the function exists. In WP-CLI context, the Divi core functions are not loaded, which results in a fatal crash.
This fatal prevents other operations (e.g. Redis cache activation on managed hosts) from completing, because the process exits prematurely.
Steps to Reproduce:
- Install Divi Theme 5.0.0-public-alpha.20.1 and Divi Supreme Pro 5.0.0-beta.12.
- Run any WP-CLI command that loads WordPress (e.g. wp option get home).
- Or attempt to enable Redis Object Cache via a host that uses WP-CLI.
- Observe: WordPress crashes with a fatal error.
Error Log (excerpt, sanitized):
PHP Fatal error: Uncaught Error: Call to undefined function et_core_is_fb_enabled()
in /wp-content/plugins/supreme-modules-pro-for-divi/divi-5/divi-supreme.php:168
Stack trace:
#0 /wp-includes/class-wp-hook.php(324): Divi_Supreme_5->load_frontend_assets()
#1 /wp-includes/plugin.php(517): WP_Hook->do_action()
#2 /wp-settings.php(727): do_action()
#3 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1374): require('...')
...
Expected Behavior:
- The plugin should not call et_core_is_fb_enabled() in contexts where Divi core functions are unavailable (e.g. WP-CLI).
- Functions should be wrapped in function_exists() checks.
- Ideally, asset loading code should bail out early when defined('WP_CLI') && WP_CLI is true.
Actual Behavior:
- Any WP-CLI call that loads WordPress crashes.
- Hosting operations that rely on WP-CLI (like enabling Redis cache) cannot complete.
Suggested Fix (Code Patch):
In divi-supreme.php, wrap calls to Divi core functions like this:
public function load_frontend_assets() {
// Bail early if running under WP-CLI
if (defined('WP_CLI') && WP_CLI) {
return;
}
// Only proceed if Divi core functions are available
if (!function_exists('et_core_is_fb_enabled')) {
return;
}
// Existing logic…
if (et_core_is_fb_enabled()) {
// Load assets for frontend builder
}
}
This ensures that WP-CLI and server-side tasks can run without crashing, while keeping the expected behavior inside the Builder.
Environment:
- Divi Supreme Pro: v5.0.0-beta.12
- Divi Theme: v5.0.0-public-alpha.20.1
- WordPress: Latest version
- PHP: 8.x
- Hosting: Managed host using Nginx + WP-CLI
- Browser: Chrome
- OS: Windows
✅ This patch would stop fatal errors in CLI/server contexts, allowing Redis activation and other WP-CLI operations to complete successfully.
Completed
Solved! Thanks!!! Version 13 was a major upgrade, thank you very much for it!!!