This is just to document an issue I discovered to help others.

If you were at one time using the Ajax module and are either switching to this or are testing both, there is an important note to be aware of. Here's the sequence of events to reproduce:

1) Enable Ajax module, and enable its sub-module Ajax plugin - comment.
2) Visit /admin/settings/ajax and enable Ajax on the comment form
3) Decide you don't really want to use that module, or you want to use this one (ajax_comments), so you disable Ajax plugin - comment.
4) Wonder why this module won't work and spend a few hours tracking it down

Here's why - even though you disabled the Ajax plugin - comment module, the validation handler is still called. That module just checks if the variable exists and not if the module is on. This causes problems with ajax_comments.

The solution is to disable Ajax plugin - comment in a very specific way:

1) Make sure Ajax and Ajax plugin - comment are ENABLED.
2) Visit /admin/settings/ajax, uncheck the "comment form", and save
3) Disable the Ajax plugin - comment module

This will successfully disable the validation handler in the other module and allow this one to work. I'd report this as a bug to the Ajax module, but the last commit was a year ago and the issue queue is piling up so I don't reasonably expect they would fix it.

You need to do this if you still have the Ajax module enabled and had Ajax plugin - comment enabled at any time previously.

Hope that helps.

Comments

rjbrown99’s picture

You may also see this as a Firebug error such as "new_content.hide() is not a function". That's a bit of a misleading error - it happens because the JSON reply never gets sent back to the browser so the new_content variable is empty. I added this as a comment since that might be what people search on.