• Resolved hudsonwebdev

    (@hudsonwebdev)


    I have a website where I use Publishpress Blocks AND blocks created with ACF using the “register_acf_block_types” function in the theme files. Before WordPress 5.6 This was not a problem. When editing a page and choosing blocks I could see both the Advanced Gutenberg blocks AND my custom ACF blocks. When the site was upgraded to WordPress 5.6 the ACF blocks are no longer available in the block chooser. I confirmed this by installing a blank WordPress with only ACF Pro and Advanced Gutenberg installed. If I start out with an older version of WordPress (5.2.9 in my test) I can see both my custom ACF Blocks and the Publishpress Blocks, if I upgrade WordPress to 5.6 the ACF Blocks Disappear.

    • This topic was modified 4 years, 2 months ago by hudsonwebdev.
Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author htmgarcia

    (@htmgarcia)

    Hi @hudsonwebdev,
    ACF hasn’t been updated to be compatible with WordPress 5.6. Not sure if that could be related, but at the time of writing this is something to take in consideration.

    Thread Starter hudsonwebdev

    (@hudsonwebdev)

    Thanks for your reply @htmgarcia ! And good point. Not in an immediate rush for this so hope they will catch it in the next update.

    Plugin Author htmgarcia

    (@htmgarcia)

    Hopefully their next update would solve the issue.

    Why did you mark this as resolved?
    The problem is in your plugin after updating, not in ACF.
    If I turn your plugin off, everything ok and I can list my custom blocks, created with ACF Pro. Please check your code.
    PublishPress Blocks Version 2.5.0
    Advanced Custom Fields PRO Version 5.9.3

    Oops, sorry. It’s really ACF PRO problem

    Plugin Author htmgarcia

    (@htmgarcia)

    No problem, @bedkirill.

    Hi @htmgarcia

    Elliot here from ACF. I’ve just been notified of this issue and would like to work together to that we can resolve the conflict.

    I can’t think of any reason why ACF would change its registration behavior when PublishPress Blocks is active, other than the timing of enqueuing scripts.

    The issue is made a little more tricky as it only affects WordPress 5.6+ users.
    Have you been able to debug any share-able info from your end?

    Plugin Author htmgarcia

    (@htmgarcia)

    Hi @elliotcondon,
    thanks for jumping to this topic.

    Still I don’t make any debug. I was waiting a new release from your end to see first if the problem was indeed on ACF. May you, @bedkirill and @hudsonwebdev provide step by step instructions to reproduce the issue so I can test in my end?

    I appreciate any detail to figure out this together!

    Hi @htmgarcia

    I think the information provided in the original ticket’s description will be suffice to test and debug. It seems that since WP 5.6, our two plugins are conflicting in some way that is preventing our plugin from registering blocks.

    I’ll perform some investigation shortly, and suspect the issue may be due to the jQuery “ready” event which has changed slightly in timing since jQuery v3. Is it possible that your plugin is causing the “ready” event to run later, perhaps by adding a timely process to the “ready” promise object?

    Plugin Author htmgarcia

    (@htmgarcia)

    Thanks for the quick reply, @elliotcondon!

    So far I understand the blocks created with acf_register_block_type are not available when PublishPress Blocks (previously known as Advanced Gutenberg) is active, correct? I did a quick test with no luck. Very likely I’m missing details to reproduce the issue. Having a test site or more details would be very helpful to figure out what can be done in our end to fix the conflict.

    Update: It seems I need the Pro version in order to reproduce the issue.

    Is possible for you to send us a ticket from here https://publishpress.com/publishpress-support/ in order to continue the conversation in private?

    Regards

    • This reply was modified 4 years, 1 month ago by htmgarcia.

    Hi @htmgarcia @elliotcondon

    We have the same issue with custom blocks created by ACF Pro that are not showing up when PublishPress Blocks is active. I would like to add the following:

    1. It only affects WP 5.6+
    2. As soon as you manually remove the “advgb_blocks_list” record in the wp_options table, the record will be regenerated by PublishPress Blocks and the custom created ACF blocks will then be added and resolves the issue.

    So as of WP 5.6+ the list is no longer being updated when you add a new ACF block, and if it’s not in that list, PublishPress Blocks ignores the block and thus not shows the block in the available blocks list.

    As @elliotcondon already mentioned it looks like the JS action “advgb_update_blocks_list” is no longer fired when a new ACF block is added?

    Hope this helps solving the issue.

    Plugin Author htmgarcia

    (@htmgarcia)

    Thanks for jumping to the discussion, @hemko! I appreciate the feedback.

    We’ll continue checking this.

    Plugin Author PublishPress

    (@publishpress)

    @elliotcondon Do you have version of ACF Pro that we can use for testing, please? You can drop us an email to help @ publishpress .com

    Thread Starter hudsonwebdev

    (@hudsonwebdev)

    I just updated the plugins and it seems you guys fixed this. Well done and much appreciated!

    Plugin Author Steve Burge

    (@stevejburge)

    Awesome, thanks @elliotcondon for your help, and all the users for the reports.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Conflict with ACF blocks created with register_acf_block_types’ is closed to new replies.