Support

Account

Home Forums Gutenberg Gutenberg blocks are not displaying ACF custom block content

Solving

Gutenberg blocks are not displaying ACF custom block content

    • teetl6

    • June 21, 2019 at 11:52 pm

    Hi

    I made custom Gutenberg blocks with ACF and using custom fields there (only one field per block). But when building post/page content in block editor then blocks are just showing blank area although content in custom fields are filled. Somekind of bug/conflict for Gutenberg + ACF?

    • teetl6

    • June 26, 2019 at 7:56 pm

    up!

  • Are you using ACF Pro and have you created templates for your Gutenberg Blocks and called them via: acf_register_block()?

    Example:

    acf_register_block(array(
    			'name'				=> 'accordian',
    			'title'				=> __('Accordian'),
    			'description'		=> __('A custom accordian block.'),
    			'render_callback'	=> 'my_acf_block_render_callback',
    			'category'			=> 'formatting',
    			'icon'				=> 'no',
    			'keywords'			=> array( 'testimonial', 'quote' ),
    		));
  • I’m having this same issue at the moment. Did you ever figure out a solution?

    • teetl6

    • July 29, 2019 at 4:28 pm

    Yes, after i created block template and coded it to show data (loop or show some fields etc) then Gutenberg started to show content inside blocks.

  • Sounds like a typo somewhere. Can you give the code of one of the broken blocks?

    • iroox

    • November 6, 2019 at 8:53 pm

    hi @ll 🙂
    I have the same issue now, I test it with the testimonial https://www.advancedcustomfields.com/blog/acf-5-8-introducing-acf-blocks-for-gutenberg/

    The custom-blocks for enter some content are not displayed, only the area of testimonial, but no fields to enter the content. I use WordPress 5.2.4 / Theme Twenty Seventeen. I tried the latest ACF PRO version and version 5.8.0-beta4.1 – Unfortunately without success.

    I’ve also seen the problem in GitHub, where Elliot wrote a solution.
    https://github.com/AdvancedCustomFields/acf/issues/79
    Unfortunately there is no path in the current WordPress version anymore, I can’t find the “includes/gutenberg/assets/js/acf-blocks.js”.

    @teetl6 – can you give mne your code-solution?

    does anyone still have any idea why the custom blocks aren’t displayed?
    Is it a ThemeProblem or Gutenberg?
    Thank you in advance for your help!

    • iroox

    • November 6, 2019 at 10:30 pm

    Ive the solution, it was my mistake, that I dont have choose the “BLOCK” in the main-editor position (I just didn’t see it) – before I choose just “POST” – Now it works great.. sometimes is so easy – I’m getting glasses. 🙂

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.