• Resolved reasondr

    (@reasondr)


    Hello,

    I’m experiencing an issue with custom blocks created with Genesis Blocks, where they randomly disappear from the front-end of my site. However, these blocks still appear in the admin editor, accompanied by the following notice:

    “Your site doesn’t include support for the ‘genesis-custom-blocks/block-name’ block. You can leave this block intact or remove it entirely.”

    Here’s the structure of where my custom block templates are located:

    • Path: wp-content/themes/child-theme/blocks/block-name/block.php

    This issue persists even though the block templates are correctly placed within my child theme directory. Interestingly, I’ve found a temporary workaround:

    1. I leave the original block templates intact.
    2. I create an exact duplicate of the disappearing block via WP Admin > Genesis Blocks Pro > Add New (Block Builder).
    3. Then, I delete the original block in the Block Builder.

    Following these steps brings the block back on the front-end, but this solution is far from ideal and not sustainable for long-term management.

    Has anyone encountered this issue before, or does anyone have insights into what might be causing this and how to resolve it more effectively?

    Any help or guidance would be greatly appreciated. Thank you!

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Contributor Ryan Kienstra

    (@ryankienstra)

    Hi @reasondr,

    Thanks for letting me know about this.

    Are there any other block-related plugins active?

    Your template structure looks fine, so you’re not doing anything wrong.

    Plugin Contributor Ryan Kienstra

    (@ryankienstra)

    Also, in the JavaScript console in the block editor, could you please run this:

    gcbBlocks['genesis-custom-blocks/name']

    And paste the result here?

    That’s the block’s configuration, and might show what the problem is.

    Especially if gcbBlocks['genesis-custom-blocks/name'].excluded has something.

    Thread Starter reasondr

    (@reasondr)

    Hi @ryankienstra,

    Thanks for getting back to me. I understand the importance of diagnosing the issue with as much detail as possible. I’ll make sure to run gcbBlocks['genesis-custom-blocks/name'] on a page where a block is currently broken at the next opportunity. Given the nature of my production site, I’ve been applying fixes immediately as issues arise, but I will report back with the results of this command as soon as another block issue occurs.

    Additionally, I’ve noticed several JavaScript errors in the WordPress admin when editing Genesis Custom Blocks Pro blocks. Here are the types of errors and warnings I’ve encountered:

    1. Uncaught ReferenceError: jQuery is not defined – This error appears multiple times with various post edit URLs.
    2. Warning about a component changing an uncontrolled input to be controlled.
    3. Warning: ReactDOM.render is no longer supported in React 18 – could indicate some of the plugin’s code might need updating to be fully compatible with React 18?

    Could these errors and warnings be related to the issue of blocks randomly disappearing from the front end? It seems they might indicate broader compatibility issues or conflicts within the WordPress admin, potentially affecting how blocks are managed and rendered.

    I would appreciate any insights or guidance on whether these JavaScript and React warnings could be contributing to the problem and how to address them.

    Many thanks for your help.

    Plugin Contributor Ryan Kienstra

    (@ryankienstra)

    Hi @reasondr,

    Thanks, I don’t think those warnings are errors are causing the problem. GCB doesn’t use jQuery, and the React errors are for rendering.

    The block error on your site points to a deeper issue: that the block wasn’t registered (“Your site doesn’t include support for…”)

    • This reply was modified 9 months, 2 weeks ago by Ryan Kienstra.
    Thread Starter reasondr

    (@reasondr)

    Hi @ryankienstra,

    Thanks for confirming those warnings and errors are unrelated.

    As soon as another block dissapears I’ll run gcbBlocks['genesis-custom-blocks/name'] and report back.

    Many thanks for your help!

    Plugin Contributor Ryan Kienstra

    (@ryankienstra)

    Thanks!

    Thread Starter reasondr

    (@reasondr)

    Hi again @ryankienstra,

    I’ve lost a whole bunch of blocks today.
    On the effected pages in admin, in console I have run
    gcbBlocks['genesis-custom-blocks/block-name'] and it returns undefined on all blocks in question.

    I also ran console.log(gcbBlocks); which returns of all my custom blocks with the exception of those that are missing / effected.

    What do you think?

    Thanks.

    Plugin Contributor Ryan Kienstra

    (@ryankienstra)

    Hi @reasondr,

    Hm, it’s not what I thought. The blocks that are lost don’t exist at all on the back-end.

    Have you ever lost other post types, like simple posts?

    The GCB blocks are post types.

    I’m not sure if I’ll be able to help.

    Thread Starter reasondr

    (@reasondr)

    Hi @ryankienstra

    Apologies for the delay in getting back to. The dissapearing blocks seems to have calmed down a little but I’m still no closer to discovering the root cause. I’ll continue to document all activity with regards to updates and rebuilding blocks etc and soon as I have any news I’ll report back.

    The good news is none of the blocks I’ve rebuilt have dissapeared as yet.

    Again, thanks for the support.

    Thread Starter reasondr

    (@reasondr)

    Hi @ryankienstra,

    Another block has recently disappeared from the front-end of our site. Prior to addressing this latest occurrence, I’ve prepared a staging environment, where I deactivated all plugins except for Genesis Blocks Pro and Genesis Custom Blocks Pro. Additionally, I’ve removed all custom PHP and JavaScript code to try and rule out conflicts.

    I can see that the missing block is still listed in the wp_posts table, confirming its existence. However, I can’t find any related metadata in the wp_postmeta table. It appears that none of the Genesis Custom Blocks store metadata in this table.

    Where does Genesis Custom Blocks stores its metadata or any additional data related to the blocks? Understanding this could be really helpful in diagnosing the issue. Any guidance or further steps you could suggest for debugging this problem would be greatly appreciated.

    Many thanks.


    Plugin Contributor Ryan Kienstra

    (@ryankienstra)

    Hi @reasondr,

    Sorry for the long delay.

    However, I can’t find any related metadata in the wp_postmeta table. It appears that none of the Genesis Custom Blocks store metadata in this table.

    Where does Genesis Custom Blocks stores its metadata or any additional data related to the blocks?

    GCB only stores block data in the custom post type of 'genesis_custom_block'. It doesn’t store post_meta.

    • This reply was modified 7 months, 2 weeks ago by Ryan Kienstra.
Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Issue with Custom Blocks Disappearing from Front-End on Genesis Blocks’ is closed to new replies.