• Resolved Al Mizan

    (@mshimul314)


    Hello

    I’m using the WPConsent plugin, and it’s very helpful overall. However, I’ve run into an issue while working with the Breakdance Page Builder.

    When I enable the “Automatic Script Blocking” option in WPConsent, the scripts required for Breakdance to function inside the editor do not load correctly. As a result, Global Blocks in the Breakdance visual builder fail to render.

    You can easily reproduce this by installing the free version of Breakdance (you can download the plugin from their official website). Once script blocking is enabled, the builder stops loading Global Blocks.

    I have also recorded a video demonstrating how Global Blocks are created in Breakdance and how the issue occurs when the Automatic Script Blocking feature is enabled in WPConsent.

    You can check the video to clearly see the problem in action: https://jam.dev/c/d8d6f22a-7f38-4591-850c-0d61822d9318

    Could you please look into this compatibility issue or suggest a workaround so that script blocking can remain active without breaking the Breakdance editor?

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @mshimul314,

    Thank you for reporting that issue, we’ll add an integration in the next release to disable WPConsent script blocking in the Breakdance editor.

    Until that is available, you should be able to achieve that using this code snippet:

    function disable_wpconsent_script_blocking_for_breakdance( $block ) {
    	// Check for Breakdance builder query parameter
    	if ( isset( $_GET['breakdance'] ) && $_GET['breakdance'] === 'builder' ) {
    		return false;
    	}
    
    	return $block;
    }
    
    add_filter( 'wpconsent_should_block_scripts', 'disable_wpconsent_script_blocking_for_breakdance' );

    Please let me know if that works for you or if you need any help setting it up on your website.

    Thanks,
    Mircea

    Thread Starter Al Mizan

    (@mshimul314)

    Hi @gripgrip ,

    Thank you for your quick response and for sharing the code snippet.

    I’ve added the code to my website, but unfortunately, it doesn’t seem to be working — the Breakdance editor is still not rendering Global Blocks when “Automatic Script Blocking” is enabled.

    Please let me know if there’s anything else I should check or modify to make the snippet work correctly.

    Thanks again for your help!
    Al Mizan.

    Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @mshimul314,

    Can you please share more details about how you are adding the snippet to your site? The code snippet should completely prevent the script blocking feature when loaded.

    Thanks,
    Mircea

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.