Support » Plugin: Block Lab » Template not showing up on the front end

  • Resolved ericburnard

    (@ericburnard)


    Hi there,

    I have tried creating a few blocks now but none of them seem to be displaying o the front end of my website.

    I have double-checked that the template names are correct and in the correct file directory. The blocks are showing up in the editor and even show the text from that template in the editor, but after I have published the page I get nothing.

    Looking at the source file for the page, the only thing that is added to the page is

    <!-- wp:block-lab/ingredients-block /-->

    Any help would be amazing!

    Eric

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Ryan Kienstra

    (@ryankienstra)

    Hi @ericburnard,
    Thanks for bringing this up.

    The blocks are showing up in the editor and even show the text from that template in the editor…

    Is there a way to look at the PHP error log? It’s strange that it’s working fine in the block editor, but on the front-end there’s no template output.

    ericburnard

    (@ericburnard)

    I have one error in the errorlog from when I first tried BlockLabs which is resolved now.

    [27-Oct-2019 15:02:55 CST6CDT] PHP Fatal error:  Uncaught Error: Call to undefined function block_field() in /home/cornerto/public_html/test/wp-content/themes/TT5/blocks/block-white-section.php:5
    Stack trace:
    #0 {main}
      thrown in /home/cornerto/public_html/test/wp-content/themes/TT5/blocks/block-white-section.php on line 5

    The only thing which is outputted in the webpage is <!– wp:block-lab/ingredients-block /–> in the source

    Plugin Author Ryan Kienstra

    (@ryankienstra)

    Hi @ericburnard,
    Thanks for checking that.

    Do non-Block Lab blocks render as expected, especially dynamic blocks like ‘Latest Comments’?

    The fact that <!– wp:block-lab/ingredients-block /–> is in the source suggests that WordPress is not parsing the block.

    For example, on https://getblocklab.com, there’s no <!– wp: comment in the source, even though it’s built using Block Lab blocks.

    Thanks, Eric!

    ericburnard

    (@ericburnard)

    Hi Ryan,

    I have tried adding the latest comments block and I am getting the same thing. It has the WP code in the source file but is not outputting anything to the web page.

    <!-- wp:latest-comments /-->

    Some of the blocks do still work such as galleries, quotes, etc.

    Is there a way to fix this?

    This is my first attempt to make a fully functioning WP site from scratch. Is it possible that I may have missed including something in the functions file that may be causing the blocks not to display?

    Plugin Author Ryan Kienstra

    (@ryankienstra)

    Hi @ericburnard,
    Thanks, that’s interesting. It looks like the block parsing is not running on the front-end.

    It sounds like you’re running WP Core 5.0 or later, otherwise there wouldn’t be a block editor at all (except if Gutenberg was running).

    This looks like an issue involving Core or Gutenberg, as other dynamic blocks aren’t rendering.

    I couldn’t find an issue in Gutenberg for this, like with:

    https://github.com/WordPress/gutenberg/search?q=dynamic+blocks+not+rendered&type=Issues

    Plugin Author Ryan Kienstra

    (@ryankienstra)

    Is there any other block-related plugin running? Maybe something that could disable blocks, or throw an error?

    ericburnard

    (@ericburnard)

    I am using ACF (Advanced Custom Fields) plugin as well. It could be that which is causing the problem.

    I am working until late tomorrow. When I get back I will disable the ACF plugin and try again to see if that is what is causing the problem.

    I will get back to you then.

    Thanks again for your help!

    Plugin Author Ryan Kienstra

    (@ryankienstra)

    Thanks, Eric!

    ericburnard

    (@ericburnard)

    Ok, So it looks like ACF plugin was stopping BlocLabs from working. Unfortunately, I already have a lot of my site built with that so I’ll have to find another way around the problem.

    Thank you for all of your help

    Eric

    Plugin Author Ryan Kienstra

    (@ryankienstra)

    Hi @ericburnard,
    Thanks for letting me know.

    Hm, do you know how ACF was stopping this from working? It’s hard to imagine that it would prevent all dynamic blocks from rendering.

    Ideally, our plugins would work together well.

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