Hi,
I want to delete all comments of a page for my plugin. My implementation only deletes the oldest.
Here's my code:
private void deleteComments(AbstractPage page) {
List<Comment> comments = page.getComments();
for(Comment comment : comments) {
commentManager.removeCommentFromObject(comment.getId());
// only removes first because event? is fired
}
}
All i found out is that the execution is interuptet after the first iteration by "SingleParameterMethodListenerInvoker".
I can't find a reason why the removeCommentFromObject method isn't invoked for all comments.
Thanks for help