From 9b21253a892b6e5a9d1dbd1340ebb6730b6277b5 Mon Sep 17 00:00:00 2001 From: Miguel Lezama Date: Fri, 27 Mar 2026 16:12:06 -0300 Subject: [PATCH] Forms: Fix black screen when The Events Calendar is active MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The wp-build generated page-wp-admin.php uses import("@wordpress/boot") inside a regular inline script. This relies on the browser importmap being in the DOM before the inline script executes. However, WordPress outputs the importmap AFTER regular footer scripts (position 107 vs 100 in the DOM), making it fragile — it works by accident in most setups due to browser microtask timing. Plugins like The Events Calendar (via StellarWP) disrupt this timing by converting scripts to type="module" via script_loader_tag, causing the import() call to fail and leaving the Forms dashboard as a black screen. Fix: Replace the inline import() with a two-step approach: 1. A plain global config (window.__jetpackFormsBootConfig) set by the regular inline script — no module specifiers needed. 2. An inline