I have comment notify working properly for default comment type. But it doesn't work for comments assigned to another comment type.

Let me explain.

Create comment type called Answers. Next, create comment type Replies and select Comment as the target. Add Replies comment type to Answers comment type. Next, we add Answers comment type to a node.

Leave an Answer. Then you try to create a "Reply" to that comment.

You get the following error.

/modules/comment_notify/comment_notify.module on line 311

If you go under Structure > Comment type > Custom Comments > Manage dispaly. The Comment notify doesn't show.

Any ideas? Am I doing something wrong or is there an issue with the module?

CommentFileSizeAuthor
#6 answer comment.png47.99 KBtepelena
#6 default comments.png37.84 KBtepelena
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tepelena created an issue. See original summary.

maaty388’s picture

Status: Active » Needs review

If you go under /admin/config/people/comment_notify you can see that you need to enable on which content types you want to apply comments, then go to the /structure/comment/manage/your_comment_machine_name/display and here you will see it works. You also need to apply comments to your content type to make it works. Hope it helps.

tepelena’s picture

Thanks for the quick reply. So I did that and now it is partially working. I am setting up a Q&A where Questions is a node and Answers are a comment type. I have created custom Comment type for Answeres and attached them to Answer comment. The issue is still there when someone comments on a Answer. It crashes giving the same error as above.

maaty388’s picture

I literally tested this right now and it is working for me without any doubts. Can you provide step by step when the problem occurs?

tepelena’s picture

I went ahead installed the module and reinstalled it. One strange issue is that when I go to comment form settings [manage form display] it doesn't show Comment Notify field. it shows it on the default comment type but not on the custom comments I created.

tepelena’s picture

FileSize
37.84 KB
47.99 KB

See attached pics.

tepelena’s picture

Still getting the error.

Fatal error: Call to a member function bundle() on null in /modules/contrib/comment_notify/comment_notify.module on line 311

The problem is not with the [Answer] comment type. It is when one tries to leave a comment for the [Answer] comment type.

tepelena’s picture

Version: 8.x-1.x-dev » 8.x-1.0-beta1
tepelena’s picture

Issue summary: View changes
tepelena’s picture

Issue summary: View changes
tepelena’s picture

Issue summary: View changes
greggles’s picture

Category: Bug report » Support request
Status: Needs review » Active

"Needs review" is for situations where there is a patch so setting this to Active. The error from comment #7 seems like it might be fixed from some of the recent patches committed or another patch in the queue. Can you try searching for that?

greggles’s picture

Status: Active » Closed (duplicate)

There is a patch at #2618182: Support all entity types as commentable, not only nodes that adds this functionality. Can you review that? Marking this as a duplicate of that.