When anonymous users write comment and then click the preview button, the top pf the page displays a notice below:

    Notice: Undefined index: format in comment_preview() (line 2053 of .../drupal/modules/comment/comment.module).

Any problem or solution to fix it?

Comments

damiankloip’s picture

I can't replicate this on a fresh D7 install. What input format is being used for the comment? if you change it do you get the same? Are there any other modules that are doing things to comments?

astra’s picture

I have a test, as a anonymous user, to write comments for articles (default node type of Drupal) and click the Preview buttom to see what happen. The problem always appears if writing comments with the plain text format, but NO problem if using filtered html format. Also for my site there are no other modules doing things to comments.

Anything wrong for comments with the plain text format?

vineet.osscube’s picture

Not able to reproduce the error what theme you are using for your setup.

astra’s picture

I'm using the theme Danland 7.x-1.0 for this site.

site1’s picture

I am having the same issue. Has this been resolved?

derekahmedzai’s picture

I get the same error when using plain text for comments.

Here's how to reproduce the problem (quoted from #813052)

1) go to manage comment fields of article
2) edit comment_body.
3) select "Plain text" under Text processing
4) Change "format" under Comment Display. ==> Plain Text
5) view an existing node and create comment.
6) click preview button.

mmilano’s picture

Version: 7.12 » 7.22

I am seeing this issue on 7.22

David_Rothstein’s picture

Issue summary: View changes
Status: Active » Closed (duplicate)

I believe this is the same issue as #2077901: Comment Preview Error for Plain Text (Undefined index: format in comment_preview()), so marking as a duplicate. (This one is older, but that issue has a patch.)