• After upgrading to 5.8, when I try to modify my widgets, I encounter errors on the Appearance > Widgets page concerning my custom html block. This occurs when I disable all of my plugins as well.

    The "custom_html" block was affected by errors and may not function properly. Check the developer tools for more details.

    Appears three times on the UI. These errors show up three times in the developer console.

    api-fetch.min.js?ver…a093f9f92520a98df:2 POST https://REPLACED/wp-json/wp/v2/widget-types/custom_html/encode?_locale=user 418
    _	@	api-fetch.min.js?ver…a093f9f92520a98df:2
    f	@	api-fetch.min.js?ver…a093f9f92520a98df:2
    (anonymous)	@	api-fetch.min.js?ver…a093f9f92520a98df:2
    b	@	api-fetch.min.js?ver…a093f9f92520a98df:2
    (anonymous)	@	api-fetch.min.js?ver…a093f9f92520a98df:2
    a	@	api-fetch.min.js?ver…a093f9f92520a98df:2
    (anonymous)	@	api-fetch.min.js?ver…a093f9f92520a98df:2
    b.method.r	@	api-fetch.min.js?ver…a093f9f92520a98df:2
    (anonymous)	@	api-fetch.min.js?ver…a093f9f92520a98df:2
    (anonymous)	@	api-fetch.min.js?ver…a093f9f92520a98df:2
    a	@	api-fetch.min.js?ver…a093f9f92520a98df:2
    (anonymous)	@	api-fetch.min.js?ver…a093f9f92520a98df:2
    (anonymous)	@	api-fetch.min.js?ver…a093f9f92520a98df:2
    t	@	api-fetch.min.js?ver…a093f9f92520a98df:2
    (anonymous)	@	api-fetch.min.js?ver…a093f9f92520a98df:2
    y	@	api-fetch.min.js?ver…a093f9f92520a98df:2
    (anonymous)	@	api-fetch.min.js?ver…a093f9f92520a98df:2
    (anonymous)	@	api-fetch.min.js?ver…a093f9f92520a98df:2
    (anonymous)	@	api-fetch.min.js?ver…a093f9f92520a98df:2
    (anonymous)	@	edit-widgets.min.js?…fef25865f0e87b861:2
    (anonymous)	@	api-fetch.min.js?ver…a093f9f92520a98df:2
    P	@	api-fetch.min.js?ver…a093f9f92520a98df:2
    C	@	widgets.min.js?ver=2…d3f54ca6175d7c7d9:2
    loadContent	@	widgets.min.js?ver=2…d3f54ca6175d7c7d9:2
    _	@	widgets.min.js?ver=2…d3f54ca6175d7c7d9:2
    (anonymous)	@	widgets.min.js?ver=2…d3f54ca6175d7c7d9:2
    Bh	@	react-dom.min.js?ver=16.13.1:126
    Dj	@	react-dom.min.js?ver=16.13.1:162
    unstable_runWithPriority	@	react.min.js?ver=16.13.1:25
    Da	@	react-dom.min.js?ver=16.13.1:60
    xb	@	react-dom.min.js?ver=16.13.1:162
    (anonymous)	@	react-dom.min.js?ver=16.13.1:162
    U	@	react.min.js?ver=16.13.1:16
    B.port1.onmessage	@	react.min.js?ver=16.13.1:24
    widgets.min.js?ver=2…d3f54ca6175d7c7d9:2 
    {code: "invalid_json", message: "The response is not a valid JSON response."}
    code: "invalid_json"
    message: "The response is not a valid JSON response."
    Prototype: Object
    constructor: ? Object()
    hasOwnProperty: ? hasOwnProperty()
    isPrototypeOf: ? isPrototypeOf()
    propertyIsEnumerable: ? propertyIsEnumerable()
    toLocaleString: ? toLocaleString()
    toString: ? toString()
    valueOf: ? valueOf()
    __defineGetter__: ? __defineGetter__()
    __defineSetter__: ? __defineSetter__()
    __lookupGetter__: ? __lookupGetter__()
    __lookupSetter__: ? __lookupSetter__()
    get __proto__: ? __proto__()
    set __proto__: ? __proto__()
    onError	@	widgets.min.js?ver=2…d3f54ca6175d7c7d9:2
    loadContent	@	widgets.min.js?ver=2…d3f54ca6175d7c7d9:2
    async function (async)		
    loadContent	@	widgets.min.js?ver=2…d3f54ca6175d7c7d9:2
    _	@	widgets.min.js?ver=2…d3f54ca6175d7c7d9:2
    (anonymous)	@	widgets.min.js?ver=2…d3f54ca6175d7c7d9:2
    Bh	@	react-dom.min.js?ver=16.13.1:126
    Dj	@	react-dom.min.js?ver=16.13.1:162
    unstable_runWithPriority	@	react.min.js?ver=16.13.1:25
    Da	@	react-dom.min.js?ver=16.13.1:60
    xb	@	react-dom.min.js?ver=16.13.1:162
    (anonymous)	@	react-dom.min.js?ver=16.13.1:162
    U	@	react.min.js?ver=16.13.1:16
    B.port1.onmessage	@	react.min.js?ver=16.13.1:24
Viewing 4 replies - 1 through 4 (of 4 total)
  • Tara King

    (@sparklingrobots)

    Hi, @dlin04!

    I just tested this out on a fresh install of WordPress 5.8. I was able to set up a new Custom HTML block as a widget without encountering this error.

    I saw that you disabled all plugins, which is a great start toward debugging. Try setting your site to one of the default (Twenty*) themes and give it another try — it may be a conflict with your specific theme.

    Thread Starter dlin04

    (@dlin04)

    Hello. I had previously managed to use the theme customizer to remove the legacy Custom HTML widget and replace it with the Custom HTML block widget.

    However, after disabling all plugins again and activating the Twenty Twenty theme, when I attempt to edit my widgets (Appearance > Widgets) I am unable to Update (save) my edits.

    The message: “There was an error. The response is not a valid JSON response.” appears in the lower left.

    Please note that if I remove the Custom HTML block, the widgets Updates (saves) normally.

    api-fetch.min.js?ver…a093f9f92520a98df:2 POST https://REPLACEME/wp-json/batch/v1?_locale=user 418
    _ @ api-fetch.min.js?ver…a093f9f92520a98df:2
    f @ api-fetch.min.js?ver…a093f9f92520a98df:2
    (anonymous) @ api-fetch.min.js?ver…a093f9f92520a98df:2
    b @ api-fetch.min.js?ver…a093f9f92520a98df:2
    (anonymous) @ api-fetch.min.js?ver…a093f9f92520a98df:2
    a @ api-fetch.min.js?ver…a093f9f92520a98df:2
    (anonymous) @ api-fetch.min.js?ver…a093f9f92520a98df:2
    b.method.r @ api-fetch.min.js?ver…a093f9f92520a98df:2
    (anonymous) @ api-fetch.min.js?ver…a093f9f92520a98df:2
    (anonymous) @ api-fetch.min.js?ver…a093f9f92520a98df:2
    a @ api-fetch.min.js?ver…a093f9f92520a98df:2
    (anonymous) @ api-fetch.min.js?ver…a093f9f92520a98df:2
    (anonymous) @ api-fetch.min.js?ver…a093f9f92520a98df:2
    t @ api-fetch.min.js?ver…a093f9f92520a98df:2
    (anonymous) @ api-fetch.min.js?ver…a093f9f92520a98df:2
    y @ api-fetch.min.js?ver…a093f9f92520a98df:2
    (anonymous) @ api-fetch.min.js?ver…a093f9f92520a98df:2
    (anonymous) @ api-fetch.min.js?ver…a093f9f92520a98df:2
    (anonymous) @ api-fetch.min.js?ver…a093f9f92520a98df:2
    (anonymous) @ edit-widgets.min.js?…fef25865f0e87b861:2
    (anonymous) @ api-fetch.min.js?ver…a093f9f92520a98df:2
    P @ api-fetch.min.js?ver…a093f9f92520a98df:2
    T @ core-data.min.js?ver…eb531dcf64543c5b7:2
    run @ core-data.min.js?ver…eb531dcf64543c5b7:2
    async function (async)
    run @ core-data.min.js?ver…eb531dcf64543c5b7:2
    G @ core-data.min.js?ver…eb531dcf64543c5b7:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    r @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    c @ redux-routine.min.js…c977063e356eb95cf:2
    t @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ data.min.js?ver=7bfa…e459d5ec92d30fdda:2
    (anonymous) @ data.min.js?ver=7bfa…e459d5ec92d30fdda:2
    (anonymous) @ data.min.js?ver=7bfa…e459d5ec92d30fdda:2
    (anonymous) @ edit-widgets.min.js?…fef25865f0e87b861:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    r @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    r @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    Promise.then (async)
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    r @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    r @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    Promise.then (async)
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    r @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    r @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    Promise.then (async)
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    r @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    r @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    r @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    r @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    r @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    r @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    r @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    r @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    c @ redux-routine.min.js…c977063e356eb95cf:2
    t @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ redux-routine.min.js…c977063e356eb95cf:2
    (anonymous) @ data.min.js?ver=7bfa…e459d5ec92d30fdda:2
    (anonymous) @ data.min.js?ver=7bfa…e459d5ec92d30fdda:2
    (anonymous) @ data.min.js?ver=7bfa…e459d5ec92d30fdda:2
    ki @ react-dom.min.js?ver=16.13.1:176
    ji @ react-dom.min.js?ver=16.13.1:13
    mi @ react-dom.min.js?ver=16.13.1:13
    lf @ react-dom.min.js?ver=16.13.1:13
    wi @ react-dom.min.js?ver=16.13.1:187
    Kd @ react-dom.min.js?ver=16.13.1:32
    pc @ react-dom.min.js?ver=16.13.1:32
    Wf @ react-dom.min.js?ver=16.13.1:34
    (anonymous) @ react-dom.min.js?ver=16.13.1:236
    uf @ react-dom.min.js?ver=16.13.1:15
    Qd @ react-dom.min.js?ver=16.13.1:42
    sc @ react-dom.min.js?ver=16.13.1:41
    unstable_runWithPriority @ react.min.js?ver=16.13.1:25
    Da @ react-dom.min.js?ver=16.13.1:60
    mk.Events.current @ react-dom.min.js?ver=16.13.1:236
    Ei @ react-dom.min.js?ver=16.13.1:41

    • This reply was modified 3 years, 3 months ago by dlin04.
    • This reply was modified 3 years, 3 months ago by dlin04.
    Thread Starter dlin04

    (@dlin04)

    same issue, false alarm.

    • This reply was modified 3 years, 3 months ago by dlin04.
    Thread Starter dlin04

    (@dlin04)

    After some troubleshooting, I’ve narrowed down the issue.

    I can save my widgets when I have a custom HTML block, but not if I include the following code in the custom html block:

    <script type="text/javascript">(function(d){var f = d.getElementsByTagName('SCRIPT')[0], p = d.createElement('SCRIPT');p.type = 'text/javascript';p.async = true;p.src = '//widgets.wp.com/platform.js';f.parentNode.insertBefore(p,f);}(document));</script>

    When trying to ‘Update’ widgets:
    There was an error. The response is not a valid JSON response.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘wp-admin/widgets.php custom_HTML block errors’ is closed to new replies.