This tag should be used for questions about node comments.

learn more… | top users | synonyms (1)

2
votes
2answers
25 views

How to change the author and date of a new comment before posting it?

I am copying the content from my old non-CMS (Weebly) website to my new Drupal website by manually filling in node forms and comment forms. I would like to recreate all the original authors and ...
0
votes
0answers
12 views

Rendering multiple comment form issue

I have a view page on which I have rendered the comment form for each node in the field using the code below: $comment = new stdClass; $comment->nid = $n->nid; $form = drupal_get_form('...
3
votes
1answer
25 views

Programmatically added comment form on node page doesn't work

I have attached a view which displays comments to basic page content type using EVA module. I've also implemented the following to have the "add comment" form displayed just above the comments list: /...
1
vote
1answer
50 views

Is there a way to provide the login provision for anonymous user when anonymous commenting is enabled?

I have enabled provision for Anonymous commenting. But it provides the only option of Your Name Email Address Homepage What I would like is, above this, there should be a provision of Login. ...
0
votes
0answers
25 views

How to restrict commenting for users that already submitted their comment? [duplicate]

I need users that have already submitted one comment to a node to be restricted from further commenting on this node. So they only could edit their existing comment.
0
votes
1answer
18 views

Convert username to hyperlink in comment reply same as Stackexchange comment reply

Is there already built module or usable functionality which is somewhat similar to stackexchange reply comment, where when we add username with @ sign, it notifies user. However in my case I would ...
1
vote
1answer
16 views

Separate Comment Form DIV from Comments DIV

Is there a way to edit the output of a specific file/line of code that will remove the comment form div from the comments div? Currently, I cannot separate the two to place them next to each other, ...
1
vote
0answers
29 views

How do I disable the subject?

In Drupal 8 I visited admin/structure/comment/manage/comment/form-display and disabled the subject. 1- The subject field is gone, but the subject label for comments is still shown. Is there any ...
1
vote
0answers
8 views

Flagging a comment to change its body?

Does anyone know if there is a way to include a button (or just a basic link) next to each comment that is used by admins only and when clicked changes the body of the comment to something like "This ...
0
votes
0answers
14 views

Comment Field, 'Your Name,' Will Not Accept Un-Registered Names

We want anonymous users to be able to leave comments with their names. However, even though I've set anonymous commenting on the appropriate content type to 'Anonymous posters must leave their contact ...
2
votes
3answers
110 views

How to disallow node authors to change node content if comments were submitted for that node?

On my site we have enquiries (nodes) and price offers (comments). So if there's at least one price offered (a comment submitted) the enquiry details (node) shouldn't be changed. Is there any way to do ...
0
votes
0answers
6 views

In comment add form hide node teaser from the top

I am having a separate page for adding comments (http//example.com/comment/reply/%nodeid). However a node teaser appears on the top of every add comment form page which I want to remove it. I have ...
0
votes
1answer
11 views

Use different comment template for replies-to-top-comment

I tried to make StackExchange-like comment section with different template for the comment replies. I create two template for both top-level comment and its replies. This is the result of the two ...
3
votes
1answer
56 views

How can I send an email to the previous comment author when a user places a new comment?

I want to get the Email address of last comment's author. Actually, I want to send email by creating a rule when new comment posted and this email will go to the user who commented on node before ...
1
vote
0answers
16 views

PDO exception when try delete statuses [closed]

I am getting a PDO exception error when I am trying to delete a status update. There is a sub module in statuses module, Statuses Comments Flag Integration; maybe it has some problem. (In addition I ...
0
votes
1answer
19 views

How do I restore the comment body field I deleted from a content type?

I deleted the comment body from the content type settings, and replaced it with another field. When posting comments, I get this error: Notice: Undefined property: stdClass::$comment_body in ...
4
votes
3answers
72 views

500 error when deleting node with 300,000 comments

I have a node which has been spammed and has 300,000 comments. Whenever I try to delete it I get a 500 internal server error. Deleting all comments via database is not an option because I need to ...
-1
votes
3answers
52 views

Where to put dpm (Devel) to see comment elements?

Where to put dpm or dsm (Devel) to see comment elements?
1
vote
1answer
20 views

Comments are Posted anonymously

I am using Services Module in Drupal 7. When I try to POST comments, these comments are Posted anonymously. I am sending POST request to ?q=endpoint/comment.json with this Body { "nid":"401","...
1
vote
0answers
36 views

Render comments in a custom Twig template

I rewrite the article tpl page--article.html.twig and I want to render the comments and the comments form. I add the comments in the content type fields and try to render with {{ node.comment | ...
0
votes
1answer
12 views

Hidden form values updated with multiple submission

I'm writing a backend validation function to prevent multiple submission for comments by logged in users in Drupal. Following is my code: function MYMODULE_form_comment_form_alter( &$form, &$...
1
vote
0answers
33 views

How to allow comment author to reply to comments on his posts

The answer to "How to disallow a user to comment on their own nodes?" includes a rule that unpublishes comments made by an author on his own posts. The rule works and is reproduced below. { "...
1
vote
0answers
25 views

Creating a View of Only Childless Comments

We have a support system in which one user can request help or insight from another user by selecting that user from a dropdown list, which is an additional field in each comment. I am attempting to ...
-1
votes
1answer
45 views

How do I remove or hide the Permalink in comments? [closed]

How do you remove or hide the 'Permalink' in comments? There is no tpl.php in Drupal 8. I remove <p class="comment__permalink">{{ permalink }}</p> from comment.html.twig, refresh, close ...
0
votes
0answers
21 views

how can i get last commented user's profile picture on page

I have a content type -> article page, with comments allowed I have a view which displays article page content with latest content with its last comment on page. I want to add a commented users ...
3
votes
3answers
124 views

Display all comments of node without pager (300+ comments)

I have a content type with threading comments. The max number of comments per page is set to 300 (that is the absolute max). If there is more than 300 comments - they get paged. How do I show all ...
0
votes
1answer
17 views

Comment form doesn't submit

I have inserted comment form to my custom node.tpl via print drupal_render(drupal_get_form("comment_node_{$node->type}_form", (object) array('nid' => $node->nid)));. It works fine, but form ...
0
votes
0answers
8 views

comments as block views and ability to rate theme

I've add a block views of comments below the corresponding nodes and sort theme in most popular order. I use rate and vote API module to let users rate comments (as agree and disagree). then I added ...
0
votes
0answers
22 views

How to hide comment path field in a view when comments are closed

I have a view that lists teasers of articles that were written. The view also displays under each teaser two field. The first one, "0 comments" shows the number of comments posted and is a link to ...
4
votes
2answers
79 views

Custom comment access

I need to prevent users from posting comments based on some conditions but I can't find any hooks I can implement. For nodes we have hook_node_access() but apparently there is no hook_comment_access()...
5
votes
1answer
71 views

Sorting comments from newest to oldest

How should I configure Drupal 8 to sort comments from newest to oldest, similarly to what the Comment Goodness module does in Drupal 7?
1
vote
1answer
25 views

Comment permission settings

Please kindly help if you know a solution for this or a ready module you may be aware of: 1:I need to set a node a way that each user can only see their own comment and replies to that. 2:Also I need ...
0
votes
1answer
23 views

How to edit comment reply link for specific content type in Drupal 7

Is there a way I can programmatically edit comment reply links for a specific content type in Drupal 7? So I need to check for the content type before changing the links: <?php if ($node->type ...
1
vote
1answer
43 views

Access to core comment preprocess variables in a custom comment layout twig template?

In Drupal 8 I have a custom comment type and when I use the default core comment.html.twig to render the comments then variables like 'new_indicator_timestamp' and 'parent' get rendered as expected. ...
0
votes
0answers
23 views

POST an emoji in comment body using Service 3.x

I'm trying to POST a comment with an emoji in my Drupal 7.43 project, where I'm using Service 3.x for all Web Service calls. Using POSTMAN (Chrome) in the body of my comment I've added: { "nid":"...
1
vote
1answer
39 views

Comment Form Missing

I'm baffled by this issue on my new site. I have double checked permissions to verify that authenticated users can post so I'm just getting that out of the way first off. However, what is odd is that ...
0
votes
1answer
15 views

Adding Comments to Custom Node Template File

Is there a way to add comments/comment form to a custom template file without having to install the Panels module? I had initially thought I could do it through a php script on the page, but have yet ...
0
votes
1answer
115 views

How to show Comment Count in a specific custom place?

How can I show Comment Count in Drupal 8 in a specific place? I want to show Comment Count's of a node (article) in the submitted area instead of in the node links area. I do this already in Drupal 7 ...
1
vote
5answers
65 views

Remove Format Options / Guideliness From Comments Textarea? [closed]

How can I remove Format Options / Guideliness from the Comments textarea in a Drupal 8 theme?
3
votes
1answer
34 views

Why does Rules event 'After updating existing content' not result in 'Create a new comment'?

I've used Create a new entity for the Rules event After updating existing content, but nothing happens. Is it a bug?
1
vote
1answer
27 views

How to loop through comments using the Rules module?

I have created a rule (using the Rules module) using Rules Event "After updating existing comment" and some comment fields must be changed. Loop node:comments is used but nothing happens when ...
1
vote
1answer
42 views

After saving a new comment How to fetch all comments for a given node?

Is it possible to fetch a list of comments for a given node by using the rule After saving a new comment? After this I would like to change a taxonomy term for a certain comment having a certain term.
1
vote
0answers
43 views

After updating existing content How to get a token node:comment for actions?

It was tried to change a term on a comment after updating existing content but there is no way to find the available token node:comment. Is there a possibility to have it?
1
vote
1answer
20 views

How to hide the “help-block” on an Image field in the Comment Form

I have added an image field to the comments. This allows to my visitors to add images with a comment. But I have annoying "help-block" for the image field in the form of adding a comment. How to ...
0
votes
1answer
23 views

How to show comment via views?

I have a content type nodes with comments. I need to show latest comment via views. For this I created a views its just showing me comment status. not comment.
1
vote
2answers
36 views

How to loop over OG group members from comment

I'm trying to set up a Rule to send a privatemsg to all group members when someone posts a comment on the group node itself. One approach I've tried using existing options provided by the OG module: ...
1
vote
0answers
30 views

How do I turn off the Comment Pager for a Type?

I have a Type configured as below, asking for 50 comments per page. However, I'm getting the pager on nodes that have as little as a single comment. I've looked at responses another question. ...
0
votes
2answers
49 views

How do I remove the information section available below the comment box?

As shown in the image, below the comment text-area there is an information section I do not want to show. How do I remove the part highlighted in red? I want the comments to appears as they do on ...
0
votes
1answer
28 views

Insert some data in comment upon comment submit

For some reason I cannot find answer to relatively simple question. How to insert some data (for example the "title" filed value) into comment body upon the comment submit. Finally I'd like to have in ...
0
votes
1answer
45 views

Get custom comments of node

I'm currently working on a simple reviewing system. I've created a custom comments type ("Review") with an integer list ("Rating") that can be added to my nodes. Now, while displaying the note, I ...