Problem/Motivation

Using D7 7.10 and I get on a comment preview the following error:

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

The error occurs only when the text processing type is "Plain text".
The bug is similar to this issue: http://drupal.org/node/813052, but concerned another line.

Proposed resolution

If I comment out the line 2053, there is no error message.

Comments

cbeier’s picture

Title: Undefined index: format in comment_preview line 2054 » Undefined index: format in comment_preview line 2053

In the initial error report was a wrong line number: The correct number is 2053. Sorry for that.

ejohnson’s picture

I also am receiving this bug when you click "Preview" on the Comment. I also have my comment textarea defined as Plain Text.

Any fix for this?

Babymaggie’s picture

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

Same issue again, Using latest drupal 7.10 and comment area is plain text... Any ideas anyone?

droplet’s picture

Status: Active » Closed (duplicate)
droplet’s picture

Version: 7.10 » 8.x-dev
Priority: Minor » Normal
Status: Closed (duplicate) » Needs review
StatusFileSize
new691 bytes

Oh #813052 hasn't include my patch: http://drupal.org/node/813052#comment-3962364

Babymaggie’s picture

That's great! - Thanks for your patch droplet - Much appreciate all your help and hard work.

Sorry I could'nt respond sooner.

Best wishes for 2012!

unic’s picture

Same here. Patch from #5 worked.

illuminatedgeek’s picture

StatusFileSize
new671 bytes

Rerolled with -p1 instead of -p2.

Status: Needs review » Needs work

The last submitted patch, 1371682-comment_preview-2.patch, failed testing.

illuminatedgeek’s picture

Version: 8.x-dev » 7.x-dev
StatusFileSize
new671 bytes

Fixed for Drupal 7.x. There's a different issue for 8.x I believe.

illuminatedgeek’s picture

Status: Needs work » Needs review
illuminatedgeek’s picture

#8: 1371682-comment_preview-2.patch queued for re-testing.

skizzo’s picture

patch #10 fixed the problem on my 7.15 installation. Thank you.

drasgardian’s picture

#10 fixed it for me too. D 7.15 also. Thank you!

droplet’s picture

Version: 7.x-dev » 8.x-dev

fix in D8 first

droplet’s picture

#5: comment.patch queued for re-testing.

droplet’s picture

Issue tags: +Novice, +Needs backport to D7

Anyone reroll #5 patch. thanks.

devin carlson’s picture

ole1111’s picture

Status: Closed (duplicate) » Needs review
Issue tags: -Novice, -Needs backport to D7

#10: 1371682-comment_preview-3.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +Novice, +Needs backport to D7

The last submitted patch, 1371682-comment_preview-3.patch, failed testing.

devin carlson’s picture

Status: Needs work » Closed (duplicate)
devin carlson’s picture

Issue summary: View changes

Damn, because of a debug output I have entered the wrong line number. The line number of the error is 2053!