Support » Plugin: Broadcast » Possible Conflict with ACF Gutenberg Block

  • Resolved karks88

    (@karks88)


    Hi, I’ve created a custom Gutenberg block using Advanced Custom Fields.

    There seems to be a conflict with ACF, as utilizing the block along with Broadcast results in the following error:

    Updating failed. The response is not a valid JSON response.

    The block I built allows you to display a custom post query, where you choose which categories, number of posts and which layout you want to use.

    When Broadcast is active, the error displays when I select certain categories (seems like the ones with the largest amount of posts) and try to publish or update the page. After some troubleshooting on a test site, it seems like disabling Broadcast allows things to work normally.

    Just to clarify, I am not actually broadcasting anything with this block. Just allowing the user to display posts on page.

    I have worked with ACF’s support but they suggested I mention the issue here as well.

    Has anyone seen an issue like this previously?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author edward_plainview

    (@edward_plainview)

    Json errors are indicative of extra text output, when there should be only json.

    When broadcast debug to browser mode is active, it will output text even though it might not be actively broadcasting.

    That could be the error. Just disable Broadcast debug mode or switch to file mode instead of browser mode.

    Otherwise, use your browser’s network monitor dev tool to keep track of json queries to the server.

    That’s all I can think of right now.

    Thread Starter karks88

    (@karks88)

    Thanks, @edward_plainview – I’ll take a look and see if that may be what is happening!

    Thread Starter karks88

    (@karks88)

    I took a look at our staging site and “Show debug in the browser” is disabled on both the network level and the individual sites we’ve been testing on.

    The JSON response in the console works just fine on most categories, but when the error occurs it outputs the HTML of the custom block. Here’s an example:
    https://pastebin.com/8LZVMJm0

    At one point I thought it might be an issue with rendering the block on the back end, and I turned that off. But other than having a larger number of posts, nothing else really sticks out about these categories.

    I should also note that Pantheon’s setup is a bit different. They use NGINX and have a version control system in place. Write permissions are limited compared to most hosts.

    We also have the Control Pack Add-On package installed, but are only using the Attachment Control feature.

    Definitely a bit of a head-scratching issue. I can’t see what would cause any sort of conflict.

    • This reply was modified 1 year, 9 months ago by karks88.
    Plugin Author edward_plainview

    (@edward_plainview)

    Is it this part that is causing the trouble?

    Array
    (
    [0] => 3
    )

    What could make BC output that data? Or, indeed, what in BC could be making other plugins output that?

    Does disabling the BC add-on pack help?

    Is BC debugging switched off completely?

    Other than that, I’m kinda running low on ideas.

    Keeping BC enabled but then commenting out line 30 of ThreeWP_Broadcast.php

    $threewp_broadcast = new threewp_broadcast\ThreeWP_Broadcast();

    Which should bc from loading at all. If that helps, then uncomment and then start going deeper: the public function _construct() function in src / ThreeWP_Broadcast.php contains a bunch of add_actions and filters you can try commenting out.

    Thread Starter karks88

    (@karks88)

    Thanks, @edward_plainview – that gives me some things to look into! I’ll let you know if I find anything of interest here.

    Thread Starter karks88

    (@karks88)

    Just to clarify, this portion of the output:

    Array
    (
    [0] => 3
    )

    Was the result of my performing a var_dump on the term IDs chosen within the block. When the errors started occurring, I wanted to make sure that output was correct. Sorry I didn’t explain that earlier.

    • This reply was modified 1 year, 9 months ago by karks88.
    Thread Starter karks88

    (@karks88)

    I have to apologize as I think I may have targeted the wrong plugin. I didn’t realize NextGEN Gallery was also a part of the equation. It was active alongside Broadcast in my testing.

    In further testing, I found that things seem to work fine with Broadcast activated – but not with NextGEN.

    Thanks for your time with this, I appreciate it!

    Plugin Author edward_plainview

    (@edward_plainview)

    Yay! I love problems that resolve themselves.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Possible Conflict with ACF Gutenberg Block’ is closed to new replies.