• Resolved Harm10

    (@harm10)


    I 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?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Harm10

    (@harm10)

    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!

    Popup Builder Team

    (@popup-by-sygnoos)

    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.

    Thread Starter Harm10

    (@harm10)

    Thanks for replying and picking up the fix.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Script error when trying to delete comment’ is closed to new replies.