I got a website www.mundraub.org where we have a Google Maps, clicking the "mehr" button on the markers loads the content of a node into a DIV wrapper and displays it to the user.
I have the "Drupal.attachBehaviors();" in the javascript as the content is loaded, but the comment section isn't ajax-comment preprocessed.

any idea how to fix this ? (if you comment on something it takes you to the node's comment section and a second comment in there works fine, and the submit button have the ajax-preprocessed class.

Comments

thechanceg’s picture

I have a similar issue. For me I am trying to use views to display one node at a time, via ajax paging. Same results, taken to the node page, comment does get saved, subsequent comments on the actual node page do work.

Any tips would be appreciated.

acouch’s picture

srgk’s picture

i have a similar problem, have you found any solution?

edulterado’s picture

Same issue here.

I´m loading node contents with an Ajax call, formatted with JSON, and the comment form returned has lost its Ajax capabilities. I have covered the following points:

  1. Load the following JS libraries in the page where the ajax call is made: drupal.ajax, drupal.form, jquery.form, drupal.textarea, filter.js
  2. Include the Drupal.Settings in the JSON object returned by the ajax call.
  3. Wrap the returned data with Drupal.attachBehaviors(). Initially, this thrown an error in Firebug which can be fixed with the patch submitted in this thread: http://drupal.org/node/1715508. Although the Submit/Preview buttons seem now to have been applied the 'ajax-processed' classes, submitting a comment redirects you to the node page where a message confirms that it has been posted. Clicking Preview instead, redirects to the node page and throws the following error:

Notice: Undefined property: stdClass::$thread in ajax_comments_entity_prepare_view() (line 375 of /path/to/drupal/sites/all/modules/ajax_comments/ajax_comments.module).

Any thoughts you might have are welcome!

formatC'vt’s picture

Issue summary: View changes
Status: Active » Postponed (maintainer needs more info)

try latest dev, please

qzmenko’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)