Deleted comment_body in content type, replaced by another new field and when posting comments there is error Notice: Undefined property: stdClass::$comment_body in function comment_submit() (string 2201 in file /modules/comment/comment.module).

If we use Permission private for the new field instead of comment_body, an authenticated user can't see it (admin can).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drusite created an issue. See original summary.

drusite’s picture

Issue summary: View changes
drusite’s picture

Issue summary: View changes
drusite’s picture

Issue summary: View changes
Vinay15’s picture

Assigned: drusite » Vinay15
Vinay15’s picture

Hi there,

I have tried to fix this issue by creating this patch. Please let me know if this works.

Thanks,
Vinay

Vinay15’s picture

Status: Active » Needs review
Tritof’s picture

The patch #6 worked for me. I'm using PHP7 on my server

markabur’s picture

Aporie’s picture

#6 worked for me, thanks.

But now comments come without subjects : "(No subject)" whereas before they were trimming the comment_body to make one.

stefan.r’s picture

Issue tags: +Needs tests
nickonom’s picture

Status: Needs review » Closed (duplicate)