Support » Plugin: Genesis Custom Blocks » Error when trying to display a custom block in the widget area

  • Resolved stephanwagnerme

    (@stephanwagnerme)


    I created a custom block and added it to a widget since you now can use Gutenberg in the widget area with wordpress 5.8.

    I can add the block, and even edit it, and it is correctly shown on the front-end. But in wordpress in the widget area it will not render the preview, it shows the error:

    Error loading block: Invalid parameter(s): attributes

    This is the complete error that comes back from the API request:

    {
        "code": "rest_invalid_param",
        "message": "Invalid parameter(s): attributes",
        "data": {
            "status": 400,
            "params": {
                "attributes": "__internalWidgetId is not a valid property of Object."
            },
            "details": {
                "attributes": {
                    "code": "rest_additional_properties_forbidden",
                    "message": "__internalWidgetId is not a valid property of Object.",
                    "data": null
                }
            }
        }
    }
Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter stephanwagnerme

    (@stephanwagnerme)

    Follow up:

    This only happens when you reload the page.

    When I add a block it renders correctly right after editing. Then, when I reload the page the error shows.

    After that, when I edit an existing block, it will always show the error.

    Plugin Contributor Ryan Kienstra

    (@ryankienstra)

    Hi @stephanwagnerme,
    Thanks a lot for letting me know. I see that also, and I’ll work on it.

    Have a great weekend!

    Plugin Contributor Ryan Kienstra

    (@ryankienstra)

    For the record, just opened a PR for this.

    https://github.com/studiopress/genesis-custom-blocks/pull/94

    It should be in the next release.

    Thread Starter stephanwagnerme

    (@stephanwagnerme)

    Very nice! Thanks a lot!

    I didn’t know it’s on github. Might be able to help out if I find another issue. I’m using this plugin a lot. It’s a life saver for coder like me who like things custom made 🙂

    Cheers!

    Plugin Contributor Ryan Kienstra

    (@ryankienstra)

    @stephanwagnerme,
    Thanks so much for your kind words! It means so much to have you with us.

    We’ll release the code in that PR here on wp.org so you can get the release like any other release. Though I don’t know the release date yet.

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