FriendsOfSymfony / FOSCommentBundle

Threaded comments for Symfony
http://friendsofsymfony.github.com/
MIT License
460 stars 231 forks source link

javascript, jquery problem #604

Closed nansnans closed 7 years ago

nansnans commented 7 years ago

Hello,

I'm trying to display my form comment on a page. I've got an issue in my console : comments.js:85 Uncaught TypeError: $.get(...).error is not a function at Object.get (comments.js:85) at Object.getThreadComments (comments.js:103) at comments.js:525 at comments.js:540

I don't know how can i fix it.

(i've got jquery 3.2.1) Can you help me ?

Thank you very much

flim commented 7 years ago

Same happened to me. Using jQuery 3.2.1 and Symfony 3

iBasit commented 7 years ago

same to me +1

symfony 2 jquery 3.2.1

It might be problem with using 3.2.1 jquery version

iBasit commented 7 years ago

The jqXHR.success(), jqXHR.error(), and jqXHR.complete() callback methods are removed as of jQuery 3.0. You can use jqXHR.done(), jqXHR.fail(), and jqXHR.always() instead.

iBasit commented 7 years ago

To support jQuery 3.*

from $.post(url, data, success).error(wrappedErrorCallback).complete(wrappedCompleteCallback); to

$.post(url, data, success).fail(wrappedErrorCallback).done(wrappedCompleteCallback);

from

$.get(url, data, success).error(wrappedErrorCallback);

to

$.get(url, data, success).fail(wrappedErrorCallback);

XWB commented 7 years ago

This was fixed in master branch several months ago: https://github.com/FriendsOfSymfony/FOSCommentBundle/commit/c721064c8f598be97c36a959e910a78a27ff670e

flim commented 7 years ago

Ok i got it. We have to use the master branch and use jquery.min.js and not jquery.slim.js

YanisDbz commented 7 years ago

I already use jquery.min.js but always the same problem ...

KhanMaytok commented 7 years ago

I have to use Jquery1.10.x to get away the problem

VarukVlad commented 7 years ago

I did like KhanMaytok. And solved problem.

XWB commented 7 years ago

Will tag FOSCommentBundle 3.0 before the end of the year.