Preview inside Gutenberg is broken ?

Support MB Blocks Preview inside Gutenberg is broken ?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #47348
    JulienJulien
    Participant

    Hello,

    The preview inside the editor doesn't work but if I save the page or the post, I have the correct display on the front-end.

    
        $meta_boxes[] = [
          'title'      => 'Hero',
          'id'         => 'my-hero',
          'description' => 'Un bloc pour mettre en avant un contenu',
          'type'            => 'block',
          'icon'            => 'awards',
          'category'        => 'layout',
          'context'         => 'side',
          'render_callback' => function () {
            echo '<header>Hello</header>';
          },
          'fields'     => [
            [
              'name' => 'Title',
              'id'   => 'title',
              'type' => 'text',
            ],
          ],
        ];
    

    On Gutenberg

    On website

    Console

    I missed something ?

    Tested without any others plugins on twentytwentyfour theme

    Metabox: 5.10.5
    Metabox AIO: 1.31.1

    #47349
    JulienJulien
    Participant

    On the network pane, I can find the ajax call to get rendered component

    #47351
    JulienJulien
    Participant

    I setup a standard WP on a different docker instance, it's work.

    But when I try with bedrock, it's broke

    #47353
    JulienJulien
    Participant

    After more research.
    If I downgrade wordpress to v6.6, no issue.

    When I go back to v6.7, the preview don’t work.

    #47355
    PeterPeter
    Moderator

    Hello,

    I'm not using Bedrock, just the standard WordPress installation with 2021 theme and I don't see that issue with WP 6.7.1.
    Can you try with a simplified environment and recheck the issue?

    #47357
    JulienJulien
    Participant

    Just found solution, when SCRIPT_DEBUG set to true, the preview don't work.

    It could be great to fix that in a future version ?

    Doc: https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/#script_debug

    Thanks

    #47365
    PeterPeter
    Moderator

    Hello,

    Thanks for your feedback. I see that when enabling SCRIPT_DEBUG, there is a warning message in the Console tab of the browser and that might cause the issue. Let me escalate the issue to the development team to check it.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.