Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thank you very much, Brian. The update seems to be working. I’ll keep you informed if there’s any further issue.
    Best regards

    Thread Starter angang

    (@angangba)

    I have created a custom code that can be helpful to disable CoBlocks in Gutenberg without deactivating the plugin, in order to keep the frontend content.

    As soon as i comment : ‘coblocks-editor’, i see the very bad block validation error !

    I don’t understand how one of the most popular plugins, backed by a major market player (GoDaddy), offers such poor support!

    I see that the JS error has not been resolved since 1 year !
    https://www.ads-software.com/support/topic/javascript-error-in-the-article-editor/

    Block validation: Block validation failed for core/paragraph (blocks.min.js)
    Content generated by save function:
    …”

    function disable_coblocks_assets_in_editor() {
    // Vérifiez si nous sommes dans l'éditeur Gutenberg
    if (!is_admin() || !function_exists('get_current_screen')) {
    return;
    }

    $screen = get_current_screen();
    if (!$screen || !method_exists($screen, 'is_block_editor') || !$screen->is_block_editor()) {
    return;
    }

    // Liste des handles à désactiver
    $handles_to_remove = [
    'coblocks-editor',
    'coblocks-frontend',
    'coblocks-extensions',
    'coblocks-animation',
    'coblocks-1', 'coblocks-5',
    'coblocks-2', 'coblocks-3', 'coblocks-4',
    'coblocks-6', 'coblocks-7', 'coblocks-8', 'coblocks-9', 'coblocks-10',
    'coblocks-11', 'coblocks-12', 'coblocks-13',
    'coblocks-tiny-swiper',
    'coblocks-tinyswiper-initializer',
    ];

    // Désactiver chaque style et script dans la liste
    foreach ($handles_to_remove as $handle) {
    wp_dequeue_style($handle);
    wp_deregister_style($handle);
    wp_dequeue_script($handle);
    wp_deregister_script($handle);
    }
    }

    // Ajoutez l'action avec une priorité élevée
    add_action('enqueue_block_editor_assets', 'disable_coblocks_assets_in_editor', 9999);

    // Ajoutez également l'action pour admin_enqueue_scripts pour plus de sécurité
    add_action('admin_enqueue_scripts', 'disable_coblocks_assets_in_editor', 9999);

    The big question is :
    Could you stop adding attributes to blocks that are not generated by CoBlocks?

    Thanks


    angang

    (@angangba)

    Oh Paul, your solution works like a charm.

    Thank you so much

    angang

    (@angangba)

    Hi,

    The plugin worked like a charm but after updating WP 5.6.2, the page is not working in tag or category description.
    It’s working in normal post or page.
    Could you help me ?

    Thanks

    Thread Starter angang

    (@angangba)

    Thank you very much Anders.
    Best regards

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