• Resolved omniafausta

    (@omniafausta)


    Hi,

    I used your great plugin with a site to make a custom block for displaying team members on a webpage.
    But on some blocks I get an error in the editor:
    Error loading block: the response is not a valid JSON response

    Some more info
    – I can edit the content of the block, and it will display correctly. The error only appears in the editor, when the block is not selected.

    – the error disappears if I don’t enter an URL in a URL box that is part of the block

    – it does not happen with all blocks: there are 2 blocks that don’t give the error also have a URL there, so it is not that entering a URL will always result in an error

    – If I make a new block and enter a URL I now always get the error

    – If I copy one of the blocks without an error, they don’t have the error, but if I edit that block, at a certain point changing URLs the error appears

    I read somewhere on this forum that JSON errors could be a conflict with other block plugins.
    I also use “Atomic Blocks – Gutenberg Blocks Collection” and I cannot remove this plugin, because it is in use on quite a few other pages.

    I really hope you can help!

    Thanks
    Joke, Omniafausta

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

    (@ryankienstra)

    Hi @omniafausta,
    Thanks for bringing this up, and for your great details.

    1. Does this happen with blocks with a lot of fields?

    It might be related to:
    https://github.com/getblocklab/block-lab/issues/436

    2. Also, is there a JavaScript console error when this happens?

    Thread Starter omniafausta

    (@omniafausta)

    Hi Ryan,

    1. yes it indeed happens with a block with lots of fields (16 fields to be precise)
    I visited the link you provided, but I don’t understand if there is something I need to do, and if so what & how…

    2. I can’t check at the moment because there seems to be a bigger issue with the site today and I cannot edit any pages right now. I’ll get back to you!

    Thread Starter omniafausta

    (@omniafausta)

    Hi Ryan,

    Update:
    Just realized besides “Atomic Blocks – Gutenberg Blocks Collection” there is yet another possible plugin that might give the conflict: “Advanced Gutenberg”
    So I tried deactivating both, but this did not help…

    So I checked the web console. After disabling the 2 plugins I got a few less remarks.
    Not sure if this tells you anything you need to know (I personally don’t know anything about javascript…)

    wp.editor.InspectorControls is deprecated. Please use wp.blockEditor.InspectorControls instead. deprecated.min.js:1:1625
    wp.editor.InspectorAdvancedControls is deprecated. Please use wp.blockEditor.InspectorAdvancedControls instead. deprecated.min.js:1:1625
    injection entry point. starting message loop with extension sandbox and waiting for settings… contentscript.js:434:13
    injection entry point. starting message loop with extension sandbox and waiting for settings… contentscript.js:434:13

    ?

    Plugin Author Ryan Kienstra

    (@ryankienstra)

    Hi @omniafausta,
    Thanks for your detailed responses, and for posting the JS console output.

    1. yes it indeed happens with a block with lots of fields (16 fields to be precise)
    I visited the link you provided, but I don’t understand if there is something I need to do, and if so what & how…

    Is this issue only happening with blocks that have a lot of fields? For example, if a block only has 1 field, is it not happening?

    If so, I think it’s caused by:
    https://github.com/getblocklab/block-lab/issues/436

    Unfortunately, there’s no solution to this. It would require a patch to WordPress Core and a PR to Gutenberg, which I don’t think are likely.

    Thanks for posting the JS console output. I don’t think any of those messages point to the issue.

    Thread Starter omniafausta

    (@omniafausta)

    Hi Ryan,

    I just did a test: A made a new block with just one field: a URL.
    But this one also gives a json error once I enter a URL

    So my thought now is that it probably is some conflict with another plugin?
    I will have to test by deactivating them in a test environment I guess…
    Or maybe you have an other idea?

    thanks!

    Thread Starter omniafausta

    (@omniafausta)

    Hi Ryan,

    Another update:
    I copied the site for some offline testing with the plugins.
    But… offline I have no issues!
    So even if I let all plugins stay activated, the block works as it should.

    So my new guess it is something to do with the host.
    But not a clue what. Do you have any indication what I should ask them?
    Could it be the php version for instance?
    My MAMP uses 7.3, their host uses 7.0

    Really hope you have a clue, where to look!

    thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘error loading block with some, but not all’ is closed to new replies.