I don't know what causes this javascript problem


This Discussion is public


I have some javascript code to show and hide a div section by clicking another, each one in a list of a Formidable view.

It works ok, but little below I inserted (outside the container) an edit link to edit-in-place an entry in its original form. I don't know if this problem is caused by javascript or Formidable itself, but when I don't update the form (only clicking on cancel) the javascript code stops working until I refresh the whole page. If I update the form, everything works fine.

The browser console shows this error: "(Deprecation) Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check (some url here)."; (it shows jquery js ver=1.12.4:4)

Sorry if I'm not so experienced but I would like to know where do I have to look to solve this.

The error you see is usually displayed as a warning message and not as an error message. The warning is usually related to an Ajax routine that is using async: false with jqXHR. In general terms, warning message can be safely ignored. There's not enough information to go on in your post to offer more detailed help. This issue requires a level of debugging that I just can't provide as a community volunteer. I suggest you open a help ticket with the Formidable team.

Thanks, Victor. I don't know if I can open a ticket for now (I have expired support at the moment), and I don't know if this could be a Formidable bug or not.

But the problem is not really the browser warning, but the fact that if the user tries to edit the entry in-place and change his mind clicking on Cancel, the javascripts stops working in all the page. Not a great issue, because the form can be still edited in-place, but somehow it's (as the warning says, he!) detrimental for the experience: in the list of entries of the View, my users may click in the header of one entry and the rest of it displays below (toggling show and hide), along with the edit link. When returning from cancelling, the entry stays displayed and can't be hidden again (unless the edit link is clicked again and press Update).

I understand that it can't be debugged so easily, just checking if someone here had noticed that issue and what its origin is. Thanks anyway. I'll try with the support desk.

UPDATE (just in case someone else reads): the javascript code doesn't stop working in all the page, only in the entry that was clicked.

The fix is usually to change async: false to async: true in the ajax call.

Thanks again, I will research how to change the async property.

Reply to this Discussion