diff --git a/projects/packages/forms/changelog/fix-forms-boot-importmap-compat b/projects/packages/forms/changelog/fix-forms-boot-importmap-compat new file mode 100644 index 000000000000..9f869a0d0d75 --- /dev/null +++ b/projects/packages/forms/changelog/fix-forms-boot-importmap-compat @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Fix Forms dashboard black screen when The Events Calendar is active by replacing fragile import() in inline script with a proper script module. diff --git a/projects/packages/forms/src/dashboard/class-dashboard.php b/projects/packages/forms/src/dashboard/class-dashboard.php index 77e1b358c261..5110f1e0185a 100644 --- a/projects/packages/forms/src/dashboard/class-dashboard.php +++ b/projects/packages/forms/src/dashboard/class-dashboard.php @@ -59,6 +59,66 @@ public static function load_wp_build() { } } + /** + * Fix import map ordering for the wp-build boot script. + * + * In wp-admin, _wp_footer_scripts (classic scripts) and print_import_map + * both hook into admin_print_footer_scripts at priority 10, but + * _wp_footer_scripts is registered first. This causes the inline + * import("@wordpress/boot") to execute before the import map exists. + * + * This fix moves the import() call from the classic inline script to a + *