Radicle + Divi: createRoot is not a function

Hi everyone,

I’m running into an issue with Radicle that doesn’t occur with a standard Bedrock setup.

When I navigate to the Divi Library layouts admin page /wp/wp-admin/edit.php?post_type=et_pb_layout (edit.php for the et_pb_layout post type), I get this JS error in the console:

TypeError: (0, external_wp_element_namespaceObject.createRoot) is not a function.
(In '(0, external_wp_element_namespaceObject.createRoot)(root)',
'(0, external_wp_element_namespaceObject.createRoot)' is undefined)

Stack trace points to:

  • initializeCommandPalette (core-commands.js:672)
  • General code (edit.php:738)

The same Divi version on a plain Bedrock install works fine — no error. So it seems like something specific to Radicle is causing wp.element.createRoot to be undefined when core-commands tries to initialize the Command Palette.

Has anyone encountered this? Any idea what could cause wp.element.createRoot to not be available in a Radicle context?

Thanks in advance!

I have no way of testing this because Divi is not free, and I’m not sure why Radicle would be causing anything here — I’d expect Divi to be enqueueing scripts with the correct dependencies so that wp-element would be loaded

You can try manually enqueueing it yourself in app/Providers/AssetsServiceProvider.php within the wp_enqueue_scripts action:

wp_enqueue_script('wp-element');