godaddy-wordpress / godaddy-wordpress/coblocks

`wp-edit-post` dependency loaded in the customizer

Open
#2,627 0 comments 0 reactions 0 assignees View on GitHub
[Priority] Low [Type] Bug
Dominant language
JavaScript
Stars
794
Forks
142
PR merge metrics
No merged PRs in 30d

Description

Hello,

One of the Blocksy theme developers here.

I’m reaching out about an issue that happens with Blocksy theme, WooCommere and CoBlocks plugins being active on the site.

The problem can be observed in the block widgets editor in the **Appearance -> Customize** area **only**.
**Appearance -> Widgets** screen works well.

In short, the issue is caused by CoBlocks loading the `wp-edit-post` dependency in the customizer screen.
I saw that in the `includes/class-coblocks-block-assets.php` file there is a specific check that skips this dependency in the `widgets.php` screen but I believe this check should also cover the customizer area too, to avoid the mentioned problem.

We also have a work-around script for it that we gave the customer until a proper fix lands in CoBlocks, here it is:
```
add_action('enqueue_block_editor_assets', function () {
global $wp_customize;

if (! $wp_customize) {
return;
}

wp_deregister_script('coblocks-editor');
}, 50);
```

I hope you could collaborate with us here on a solution. Thank you!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.