0

Good morning, I need your help! I have my wordpress and woocommerce website hosted on azure, and when trying to edit a widget I get this error 'invalid JSON...' help!

I already read all the forums with the different solutions, and nothing works. I already installed the classic editor, save the permalinks, it still doesn't work, it only happens with the widgets, and I only have a problem in azure, because I had it in another hosting and it worked perfectly. :/

3
  • Please edit your question to use english, this is an english stack. I've ran it through google translate. In the meantime, if you load any page of the REST API it's very likely you will see the cause of your problems right at the very top. The REST API is meant to respond using JSON, but yours has unwelcome output that breaks this.
    – Tom J Nowell
    May 27, 2022 at 18:59
  • Good morning, thanks for changing the language. If I get this error at the top of the widget editor. Pressing Update generates the Invalid JSON error. Error: "Notice: Function wp_enqueue_script() was called incorrectly. The "wp-editor" script should not be queued together with the new widget editor (wp-edit-widgets or wp-customize-widgets). Visit Debugging in WordPress for more information. (This message was added in version 5.8.0.) in ...\wp-includes\functions.php on line 5831 Skip to main contentGo to toolbar"![enter image description here](i.st
    – Patri
    May 30, 2022 at 14:43
  • You posted your reply as a solution rather than a comment, use the Edit link to update your question. Otherwise it seems you already know why the problem happens, it's in the error message. As a result this error message is breaking the JSON data. You should disable all your plugins and switch to a default theme, then re-activate them one by one until the message returns. Then you will know the cause
    – Tom J Nowell
    May 30, 2022 at 16:24

1 Answer 1

0

Chances are you have an error in your code, possibly calling a deprecated or non-existing WordPress function.

This has happened to me twice, both times when saving a page in the editor. I systematically commented out functions in functions.php and eventually the error stopped. The offending function was something I scrapped off someone's blog without really understanding it. So, be careful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.