• I’m using WordPress 6.2.2, and have been using the classic widget editor. I am trying to ditch that and use the widget blocks editor, but when I try to save the widgets, I get the “There was an error. The response is not a valid JSON response” error. I don’t have a problem saving block posts.

    I’ve gone through and replaced all legacy widgets with new ones, so I don’t think it has to do with a corrupt widget or whatever.

    I’ve seen other support threads that say use the classic editor, but I’d like to get the blocks widgets working.

    The browser console inspector shows this error when I press the Update button: “Failed to load resource: the server responded with a status of 405 ()”

    Clicking on the browser inspect console link, it shows this in the Application tab: “405 Not Allowed” and it refers to a script src in the “/cdn-cgi/apps/head/” folder, which is related to Cloudflare. I’ve tried pausing Cloudflare, but the same error appears.

    I’ve tried deactivating all the plugins and using the default theme, but the problem persists. How can I solve this issue?

    Thanks for any help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • If you changed from a classic to block editor you will not be able to use widgets. WordPress is moving away from widgets and toward a block environment. You would either have to find a block that will work in place of the widget or stay with a classic theme. Widgets holders in a theme are programmed with php code. The new block themes use html and JavaScript comments to layout the web site. There is simply no way to add widgets to a block theme.

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

    (@jamminjames)

    Okay, didn’t know that, thanks. The theme I’m using does allow for block posts, though, so this is a bit confusing. Will the php widgets stop working completely at some point as WordPress progresses?

    widgets will work in classical themes but not block based themes. You can use blocks in the classical themes as well.

    Thread Starter jamminjames

    (@jamminjames)

    So, if you can use blocks in classical themes, why can’t we use them for widgets in this one? You said “If you changed from a classic to block editor you will not be able to use widgets.” So, if we had never used the classic editor in this theme, we could still use blocks for widgets? That seems very odd to me.

    I am using blocks for widgets in another website with a classical theme, so this seems strange.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Cannot update widgets’ is closed to new replies.