Troubleshooting Blank Plugin Settings Pages in WordPress After a Core Update
Following a recent WordPress core update to version 7.1, several plugin settings screens (such as Fluent Mail, User Role Editor, and Block Visibility) rendered completely blank in the WordPress admin dashboard. The outer administrative chrome—including the top toolbar, left sidebar, and version footer—loaded normally, but the inner content container failed to mount.
Initial Symptoms & Diagnostic Steps
- Server-Side Execution: Enabling
WP_DEBUGand checkingwp-content/debug.logshowed that PHP executed through to completion on page visits without throwing blocking fatal errors during the initial options page rendering. - Browser Console Exceptions: Opening Chrome DevTools (F12 → Console) revealed cascading JavaScript failures across core WordPress scripts:
Uncaught SyntaxError: Invalid or unexpected token (at load-scripts.php:12) Uncaught SyntaxError: Invalid or unexpected token (at i18n.min.js:3) Uncaught ReferenceError: wp is not defined - Asset Inspection: Viewing core script files (such as
wp-includes/js/dist/i18n.min.js) inside the DevTools Sources tab revealed lines filled entirely with null bytes (\0\0\0.../NULNULNUL).
Root Cause
During automated background core updates or uncompressed archive extractions, an interrupted write stream or volume buffer flush can cause the filesystem to pre-allocate zero-padded blocks without finalizing the script content. JavaScript parsers fail immediately upon encountering raw null bytes in source files, halting script execution before WordPress packages (like wp.i18n, wp.element, and wp.domReady) can initialize the React-based admin interfaces.
Standard in-place core reinstalls through the WordPress dashboard often write over existing file footprints without truncating trailing zero-padded blocks, leaving the corrupt null bytes in place while browsers aggressively cache the broken assets.
The Solution
To resolve the issue, the corrupted core JavaScript directories were completely cleared and replaced with clean source files from the official WordPress release archive, followed by resetting the asset cache.
1. Clean and Rebuild Core JavaScript Directories
Execute the following commands inside the container or server shell to wipe the corrupted asset folders and extract a fresh copy directly from WordPress.org:
cd /tmp
curl -sO https://wordpress.org/latest.tar.gz
tar -xzf latest.tar.gz
rm -rf /var/www/html/wp-includes/js/*
rm -rf /var/www/html/wp-admin/js/*
cp -rf wordpress/wp-includes/js/* /var/www/html/wp-includes/js/
cp -rf wordpress/wp-admin/js/* /var/www/html/wp-admin/js/
chown -R www-data:www-data /var/www/html/wp-includes/js /var/www/html/wp-admin/js
rm -rf latest.tar.gz wordpress
2. Clear Storage & Browser Caching
- Server Cache: Clear any cached scripts in
wp-content/cache/if object or asset caching plugins are enabled. - Browser Cache: Open browser DevTools, enable Disable cache under the Network tab, and perform a hard refresh (
Ctrl + Shift + RorCtrl + F5).
Once fresh scripts are placed and the local cache is bypassed, core packages initialize cleanly, and all React and block-dependent plugin settings panels render immediately.
No comments:
Post a Comment