Hello,
I'm using a customized version of Advanced Forums based on 7.x-2.3 but this problem may apply to others. I just upgraded my Ajax Comments to 7.x-11 from 7.x1.0-beta2 and noticed that Ajax Comments weren't working in my Forums, which use the Advanced Forum module.

The error being thrown from line 13 of ajax_comments.js was TypeError resulting in the console with 'ajaxComments-ScrollToElementError: TypeError'

I figured out that the jQuery dom element needed to attach the ajax comment form to was not being found by Ajax Comment. The comment container of Advanced Forum comments is missing the 'comment-wrapper-MYCID' class selector. You can insert it by adding it to the classes array on line 29 of Advanced Forum module's 'advanced_forum_preprocess_comment.inc'. You first need to grab each comment's CID value by assigning a var like $comment_cid = &$variables['elements']['#comment']->cid. Then on line 29 add comment-wrapper-'.$comment_cid.' to $variables['classes_array'][] array.

Until you guys adapt to Advanced Forum this is a quick fix to Advanced Forum, where I'll also add it as an issue.

best

Comments

formatC'vt’s picture

Status: Active » Closed (won't fix)
Issue tags: -ajax comment

This is already fixed #2174655: Keep default classes from Drupal core comments
You should use option "Keep default CSS classes (For experts only)"