Fatal error in AssetsHandler.php during Customizer preview
-
Issue:
The plugin is throwing a fatal error that crashes the entire site (including wp-admin) whenever WordPress’s Customizer tries to load with an invalid or expired changeset. This has happened multiple times and has taken down site access completely until resolved manually via server file access.
Error / Stack Trace:PHP Fatal error: Uncaught Error: Call to a member function is_preview_mode() on null in /wp-content/plugins/wp-expand-tabs-free/src/Modules/ProductTabs/Frontend/AssetsHandler.php:52
Stack trace:
#0 wp-includes/class-wp-hook.php(341): ShapedPlugin\SmartTabsFree\Modules\ProductTabs\Frontend\AssetsHandler->enqueue_frontend_assets('')
#1 wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array)
#2 wp-includes/plugin.php(522): WP_Hook->do_action(Array)
#3 wp-includes/script-loader.php(2329): do_action('wp_enqueue_scri...')
#4 wp-includes/class-wp-customize-manager.php(462): wp_enqueue_scripts()
#5 wp-includes/class-wp-customize-manager.php(561): WP_Customize_Manager->wp_die(0, 'Non-existent ch...')
#6 wp-includes/class-wp-hook.php(341): WP_Customize_Manager->setup_theme('')
#7 wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array)
#8 wp-includes/plugin.php(522): WP_Hook->do_action(Array)
#9 wp-settings.php(697): do_action('setup_theme')
#10 wp-config.php(113): require_once
#11 wp-load.php(50): require_once
#12 wp-blog-header.php(13): require_once
#13 index.php(17): require
thrown in /wp-content/plugins/wp-expand-tabs-free/src/Modules/ProductTabs/Frontend/AssetsHandler.php on line 52How it appears to be triggered:
This occurs specifically when WordPress’s Customizer bootstrap runs with a non-existent/invalidcustomize_changeset_uuid(e.g.,WP_Customize_Manager->wp_die(0, 'Non-existent changeset...')). It looks likeAssetsHandler->enqueue_frontend_assets()is callingis_preview_mode()on an object that hasn’t been initialized in this code path, so it fatals instead of failing gracefully.Impact:
Since this fires duringsetup_theme, it crashes the entire site — front end and wp-admin alike — not just the Customizer preview itself. This makes it a critical severity issue for us, not just a minor edge case.Request:
Could you confirm whether this is a known issue, and if there’s a patch or workaround available? Happy to provide further debug info if needed.
You must be logged in to reply to this topic.