Support » Plugin: Genesis Custom Blocks » Editor wont display block – Error loading block: Invalid parameter(s): context

  • Resolved calrk

    (@calrk)


    I have installed and set up a few custom blocks using this plugin. They display fine in the end page and the fields can all be edited in the page editor, but there is no preview of the block in the page editor.

    Each block appears as a rectangle with the text ‘Error loading block: Invalid parameter(s): context’. When clicking on the block, then the fields appear and can be edited.

    I have tried updating wordpress to 5.6, creating the ‘preview’ files and disabling other plugins that could be interfering but nothing has changed the result yet.

    I’m not sure of any other information that could help, but am willing to send anything that could help.

    Thanks

    The page I need help with: [log in to see the link]

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

    (@ryankienstra)

    Hi @calrk,
    Thanks for letting us know about that.

    Are there any other block-related plugins active? If so, could you please try deactivating all plugins except this?

    Thread Starter calrk

    (@calrk)

    Hi @ryankienstra

    I disabled all other plugins and its still the same result. The main one I think that could conflict is advanced custom fields but even with it disabled nothing changes.

    I’m on Version 1.0.3 of Genesis Custom Blocks and Version 5.6 of WordPress using a custom theme with these blocks.

    Plugin Contributor Ryan Kienstra

    (@ryankienstra)

    Hi @calrk,
    Thanks for your details.

    1. Do Core dynamic blocks like ‘Latest Comments’ and ‘Latest Posts’ have this same problem?
    2. Could you see if this problem exists with another theme like Twenty Twenty?

    Thread Starter calrk

    (@calrk)

    Thanks for looking into it.

    1) Yes these blocks both have the same issue. Other static blocks like text/images do not.
    2) Yes the problem still exists with the TwentyTwenty theme.

    The site has been around for a few years and modified a fair bit, so could be something old in it thats conflicting, but I wouldn’t know what to look for to fix it.

    Plugin Contributor Ryan Kienstra

    (@ryankienstra)

    Thanks for your details about this.

    Hm, if the issue also exists with Core dynamic blocks, we’re probably not going to be able to fix this in Genesis Custom Blocks.

    This might be related to this issue, though it’s for ‘attributes’ instead of ‘context’:

    https://github.com/WordPress/gutenberg/issues/16850

    • This reply was modified 2 months, 2 weeks ago by Ryan Kienstra.

    Hi, I’m having the same issue. Can you tell me what the solution was?

    • This reply was modified 1 month, 2 weeks ago by teemberland.
    Thread Starter calrk

    (@calrk)

    So I haven’t got a full solution yet, but have figured out a cause.

    Under Settings > Permalink Settings, my site was set to ‘Custom Structure’ in order to add the post titles in the address of the url (rather than post ID). By changing this back to ‘Plain’ the blocks then rendered fine in the Page Editor. However this will make the page urls use PageId rather than page title (eg /?page_id=3492) which is not desired for us.

    I am unsure how to get both the editor working and the page title urls, and at the moment am just building out the blocks on a staging site. If anyone knows how to get both working that would be great, or if I figure it out I will add a response here.

    Thanks

    @calrk I finally fixed this issue and I believe it will fix your issue as well. Like you, we want to use post name for permalinks. If you are using nginx to serve your website, look for ‘try_files’ line in your config file and update it to:

    try_files $uri $uri/ /index.php$is_args$args;

    Adding $is_args (which will print a ? character if query arguments are found) will allow WordPress to properly receive and interpret the query parameters.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.