J
J
JastaFly2021-09-30 17:37:19
1C-Bitrix
JastaFly, 2021-09-30 17:37:19

Bitrix error json_failure?

Good day to all! After updating Bitrix to version 21.400.300, when sending an ajax request, I get a json_failure error . To send a request, the BX.ajax.runComponentAction method is used:

e.preventDefault();
                BX.showWait();
                var form = $(this);
                var data = new FormData(this);
                var htmlContainerSelector = _this.params.htmlContainerSelector;

                var request = BX.ajax.runComponentAction('citfact:lk.company_page', 'changeCompanyInfo', {
                    mode: 'class',
                    data: data,
                    signedParameters: _this.params.signedParameters
                });

Tell me what could be wrong?!??

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JastaFly, 2021-12-03
@JastaFly

Generally business was in implementation of ajax in a component. A whole ready-made component with data was transferred from the back to the front, and then through the JS, the HTML of the component was completely redrawn. In the new version, the BX.ajax method was redesigned in such a way that this approach led to an error. We managed to fix this by rewriting the back, so that it would not return the finished component to the front, but only the data for it, and later JS would scatter them around the page

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question