Submitted by Art Williams on Mon, 05/23/2011 - 9:59am

The problems is with the comment form structure. It's changed from D6 to D7.

The comment body in D6 was stored in $form['comment_filter'] but in D7 it's $form['comment_body']

If you change this:

//Comment
$form['your_comment']['comment_filter']['comment'] = $form['comment_filter']
['comment'];
unset($form['comment_filter']['comment']);

to this:

//Comment
$form['your_comment']['comment_body']['comment'] = $form['comment_body']
['comment'];
unset($form['comment_body']['comment']);

that might get rid of your errors, but I haven't tested it.

There may be other parts of the comment form that have changed so I would recommend looking at the Drupal API

Plus you can install the Devel module and chart out the new form structures for D7.

Hope that helps.

The content of this field is kept private and will not be shown publicly.

Plain text

  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.