Hello,
between Ajax Comment i use modul "Comment sort by created" for showing new comments in top. In comment-wrapper.tpl.php i moved the comment_form in top too (before comments).
Now i have the problem .... when i post new comment over ajax .... he will show in the end from existing comments - not at beginning.
When you have 11 comments and you write a new comment he will published at number 12 - not number 1 and the writer dont see the comment in top. Only when i reload the site new comment will be number 1.
Has anyone a tip or an idea how can i fix this problem?
Sorry for my bad english.
Regards Matthias
Comments
Comment #1
Anonymous (not verified) commentedHi Matthias
I have exactly the same problem. And i would be very happy for a solution!
would anyone advice?
Comment #2
drummondf commentedSubscribing - I tried commenting out the AJAX that scrolls to the bottom, and that helped a bit, but the issue now is that the comment is created at the bottom of the comments and doesn't move to the top until it is refreshed.
Comment #3
k.minkov commentedSince I have the exact same problem I created a patch to the latest dev version that adds an option in configuration to show comments on top.
Comment #4
k.minkov commentedComment #5
k.minkov commentedThis is the same patch but against the latest stable version 7.x-1.0-alpha2
Comment #6
k.minkov commentedThis is a little improved version of the patch above(against latest stable version 7.x-1.0-alpha2).
Comment #7
muschpusch commentedSorry i was kind of busy... Could you re-roll against current dev? Also the selectors changed since the old code didn't work well with the views integration
Comment #8
k.minkov commentedHere is a patch against latest dev. I also added descending ordering of the comments when "Post on top" is selected.
Comment #9
formatC'vt commentedthis descending ordering of the comments work fine with multi-page (paginated) comments? I think pagination may be broken when you alter only sql request.
Comment #10
k.minkov commentedNo, there is no problem with pagination.
Comment #11
ConradFlashback commented#8 is perfect.
I hope this will go to the next beta version.
Comment #12
ConradFlashback commentedNo sorry, #8 has a big problem.
It orders at the top the comments for all content types, not only for content types set in the admin.
Comment #13
formatC'vt commentedi'm not sure about this anyway because this is a comment_goodness module functionality
Comment #14
ConradFlashback commentedI post a sample image...
I have only a content type "Tag" with Ajax Comments enabled.
I also set new "post on top" check.
I have the top position not only in "tag" content type but also in all content types comments (also in advanced forum posts, that's not good).
Comment #15
k.minkov commentedYess, this is really serious issue. Here is a new version of the patch that fixes it.
Comment #16
ConradFlashback commentedk.minkov now is perfect!
Thanks!!
Comment #17
anonym-developer commentedstill got an issue after #15:
if there are no comments yet, the first comment is been prepended to my form. any ideas?
Comment #18
formatC'vt commentedwhy do you don't want set comment place in site theme?
Comment #19
hydra commentedThis module is compatible with comment_goodness which will achive that.
However, if you are not interested in all the "goodness" there is https://www.drupal.org/project/comment_sort_created which will only do that.
With the attached patch ajax_comments will be compatible with the other module, too. I think this is much easier then the proposed approach.
Comment #20
formatC'vt commentedthanks but, what about if you don't have comment_goodness and comment_sort_created?
$sort = NULL, not1?Comment #21
hydra commentedOh yeah, thx for the review. Should be default then right? Updated the patch a bit to be a bit more robust.
Comment #23
formatC'vt commentedcommitted with some fixes but this issue still needs work i think.
Comment #24
formatC'vt commentedLatest release has compatibility with Comment sort by created module