This is more a fix I found rather than a question.
On a Symfony 3 project, I decided to upgrade to bootstrap 3 to 4. It implied using JQuery3 which is not fully compatible with the asynchronous comments display of Fos Comment Bundle 2.0.14 (and probably earlier).
You'll probably get a JS error:
TypeError:$.get(...).error is not a function
This is due to the fact that the '.error' called in the js is deprecated in jQuery3 (see at the bottom of https://api.jquery.com/jQuery.Ajax/).
To correct this cleanly, without modifying the bundle files:
STEP1:
copy the file
to
(or whatever name you want)
STEP 2:
update the lines
to
and
to
STEP 3:
copy
to
STEP 4:
modify the line
like this: