S
S
sergo5732021-10-29 16:33:02
WordPress
sergo573, 2021-10-29 16:33:02

In the Wordpress admin panel, when saving a widget, an error occurs: “An error has occurred. The response is not a valid JSON response." how to solve?

When saving the widget, an error occurs (and nothing is saved):

Произошла ошибка. Ответ не является допустимым ответом JSON.

An error appears in the console:
/wp-json/batch/v1?_locale=user:1 Failed to load resource: the server responded with a status of 405 ()


Has anyone encountered such a problem? How to solve it?

If you click "Update" again, this is what happens:
Open spoiler
OPTIONS /wp-json/batch/v1?_locale=user 405
_	@	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
t	@	sub-table-block.js?v…3c5c8af07ed6b6807:1
(anonymous)	@	api-fetch.min.js?ver…a093f9f92520a98df:2
(anonymous)	@	edit-widgets.min.js?…6ab91380888bf69f0:2
(anonymous)	@	api-fetch.min.js?ver…a093f9f92520a98df:2
P	@	api-fetch.min.js?ver…a093f9f92520a98df:2
k	@	core-data.min.js?ver…d3d0ff96789da023d:2
run	@	core-data.min.js?ver…d3d0ff96789da023d:2
async function (async)		
run	@	core-data.min.js?ver…d3d0ff96789da023d:2
H	@	core-data.min.js?ver…d3d0ff96789da023d:2
(anonymous)	@	redux-routine.min.js…5d1891cf1f898211e:2
(anonymous)	@	redux-routine.min.js…5d1891cf1f898211e:2
(anonymous)	@	redux-routine.min.js…5d1891cf1f898211e:2
r	@	redux-routine.min.js…5d1891cf1f898211e:2
(anonymous)	@	redux-routine.min.js…5d1891cf1f898211e:2
c	@	redux-routine.min.js…5d1891cf1f898211e:2
t	@	redux-routine.min.js…5d1891cf1f898211e:2
(anonymous)	@	redux-routine.min.js…5d1891cf1f898211e:2
(anonymous)	@	redux-routine.min.js…5d1891cf1f898211e:2
(anonymous)	@	redux-routine.min.js…5d1891cf1f898211e:2
(anonymous)	@	data.min.js?ver=a9e9…fe7909ba8348395b7:2
(anonymous)	@	data.min.js?ver=a9e9…fe7909ba8348395b7:2
(anonymous)	@	data.min.js?ver=a9e9…fe7909ba8348395b7:2
(anonymous)	@	edit-widgets.min.js?…6ab91380888bf69f0:2
(anonymous)	@	redux-routine.min.js…5d1891cf1f898211e:2
(anonymous)	@	redux-routine.min.js…5d1891cf1f898211e:2
r	@	redux-routine.min.js…5d1891cf1f898211e:2
(anonymous)	@	redux-routine.min.js…5d1891cf1f898211e:2
(anonymous)	@	redux-routine.min.js…5d1891cf1f898211e:2
(anonymous)	@	redux-routine.min.js…5d1891cf1f898211e:2
r	@	redux-routine.min.js…5d1891cf1f898211e:2
(anonymous)	@	redux-routine.min.js…5d1891cf1f898211e:2
(anonymous)	@	redux-routine.min.js…5d1891cf1f898211e:2
(anonymous)	@	redux-routine.min.js…5d1891cf1f898211e:2
r	@	redux-routine.min.js…5d1891cf1f898211e:2
(anonymous)	@	redux-routine.min.js…5d1891cf1f898211e:2
(anonymous)	@	redux-routine.min.js…5d1891cf1f898211e:2
(anonymous)	@	redux-routine.min.js…5d1891cf1f898211e:2
r	@	redux-routine.min.js…5d1891cf1f898211e:2
(anonymous)	@	redux-routine.min.js…5d1891cf1f898211e:2
c	@	redux-routine.min.js…5d1891cf1f898211e:2
t	@	redux-routine.min.js…5d1891cf1f898211e:2
(anonymous)	@	redux-routine.min.js…5d1891cf1f898211e:2
(anonymous)	@	redux-routine.min.js…5d1891cf1f898211e:2
(anonymous)	@	redux-routine.min.js…5d1891cf1f898211e:2
(anonymous)	@	data.min.js?ver=a9e9…fe7909ba8348395b7:2
(anonymous)	@	data.min.js?ver=a9e9…fe7909ba8348395b7:2
(anonymous)	@	data.min.js?ver=a9e9…fe7909ba8348395b7: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

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sergo573, 2021-10-29
@sergo573

Contacted hosting support, their response is:

Added PUT, DELETE, HEAD, OPTIONS, PATCH to allowed methods. They are disabled by default.

After that everything worked!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question