Conversation
supportI am testing this promising plug-in. When I try to delete a comment a get a script error: TypeError: SGComment.prototype.ajaxDelete is not a function 1 admin.php:1:1 What is wrong here?
I did some investigating. In file sgComment.js in folder assets/page/scripts is the following code: SGComment.ajaxDelete = function(id) { if (confirm('Are you sure?')) { var deleteAction = 'Comment_ajaxDelete'; var ajaxHandler = new sgrbRequestHandler(deleteAction, {id: id}); ajaxHandler.dataType = 'html'; ajaxHandler.callback = function(response){ location.reload(); }; ajaxHandler.run(); } }; when changed to SGComment.prototype.ajaxDelete = function(id) { if (confirm('Are you sure?')) { var deleteAction = 'Comment_ajaxDelete'; var ajaxHandler = new sgrbRequestHandler(deleteAction, {id: id}); ajaxHandler.dataType = 'html'; ajaxHandler.callback = function(response){ location.reload(); }; ajaxHandler.run(); } }; the error is gone. So please update your file!
Dear User, Thank you very much for reporting the issue! We’ve fixed it in our upcoming update! There won’t be any this kind of problems in the updated version! Best regards, Sygnoos Team.
Thanks for replying and picking up the fix.
I did some investigating. In file sgComment.js in folder assets/page/scripts is the following code: SGComment.ajaxDelete = function(id) { if (confirm('Are you sure?')) { var deleteAction = 'Comment_ajaxDelete'; var ajaxHandler = new sgrbRequestHandler(deleteAction, {id: id}); ajaxHandler.dataType = 'html'; ajaxHandler.callback = function(response){ location.reload(); }; ajaxHandler.run(); } }; when changed to SGComment.prototype.ajaxDelete = function(id) { if (confirm('Are you sure?')) { var deleteAction = 'Comment_ajaxDelete'; var ajaxHandler = new sgrbRequestHandler(deleteAction, {id: id}); ajaxHandler.dataType = 'html'; ajaxHandler.callback = function(response){ location.reload(); }; ajaxHandler.run(); } }; the error is gone. So please update your file!
Dear User, Thank you very much for reporting the issue! We’ve fixed it in our upcoming update! There won’t be any this kind of problems in the updated version! Best regards, Sygnoos Team.
Thanks for replying and picking up the fix.