Hi guys, great module... had a flawless install and the module is running very well!
The comments form is appending form submissions to the top of the page instead of their proper location.
Story:
I'm displaying multiple comments and multiple comment forms in a single panel pane. Structure looks like this:
panel_top
panel_mid
- node_1
- - comment_form
- node_2
- - comment_form
- node_3
- - view_list_comments
- - - comment_1
- - - comment_2
- - comment_form
- node_4
- - view_list_comments
- - - comment_1
- - comment_form
panel_btm
Nodes are listed in a view. Comments are listed under each node using an embedded view. Comment form is attached in a PHP views field for each node beneath the comments embedded view. The first two comments are displayed, and a comment form follows each one. Submitting the form works well, except it appends the #comment-wrapper-x to the top of the page instead of the view! I would _like_ the comments to appear on top (or beneath) the other existing comments for the corresponding node.
I don't think this backstory is so important, but maybe i'll help you wrap your head around it. I'm looking at line 228 of ajax_comments.module right now - the one that says
$commands[] = ajax_command_append('#comment-wrapper-' . $comment->pid, $notify_text . $comment_output);
... and I'm thinking that this is the place to start looking. Seeing the if/then statement there (lines 215-256) I would assume that the module isn't finding the associated comment-wrapper-x because it's up 2-3 levels and down 1 instead of wherever it SHOULD be. Thought it would be worth inquiring here though, you guys might have an idea or two as to where to check. Here are my questions:
- Is it possible to specify the location for each comment to append to?
- How can I re-route the module to search for the comment wrapper in a different place?
- Is there a more efficient way to debug this module than trial-and-error?
If you can help and would like to take a look, please email me at emcniece@gmail.com and I will send you a link and anything else you need. It's a sensitive client, but I'm in a bind and really need a hand.
Many, MANY thanks for any thoughts you might have.
Comment | File | Size | Author |
---|---|---|---|
#5 | ajax_comments.patch | 1.7 KB | Georgique |
Comments
Comment #1
acouch CreditAttribution: acouch commentedI am noting this as a release blocker. I'll be working on this in the next couple of weeks.
Comment #2
acouch CreditAttribution: acouch commentedHere is a temp solution that has worked for one user: #1447792: lifehack: simple way to use views comments with ajax comments
Comment #3
andypostgot same troubles here, suppose the issue title should be changed
comments should be appended after the parent comment and wrapper if no parent pointed
Comment #4
emcniece CreditAttribution: emcniece commentedvery cool, thanks for wrangling post links acouch.
Comment #5
Georgique CreditAttribution: Georgique commentedPlease, look through this patch
Comment #6
Georgique CreditAttribution: Georgique commentedComment #7
andypost@Georgique patch looks good, +1 to commit
this could be useful not only for panels
Comment #8
acouch CreditAttribution: acouch commented@andypost, thanks for the review. This has been committed: http://drupalcode.org/project/ajax_comments.git/commit/7ea3a86
I changed the title to reflect that this fix is for panels only.