Questions tagged [comments]

Use it for questions about the comment entity.

201 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3 votes
2 answers
157 views

Do any comment modules play well with revisioning?

I'm faced with a situation where we need to keep track of which node revision a comment was made for, so that we can display whether the comment was made for a newer/older revision, or for the one ...
Alicja Z's user avatar
  • 141
3 votes
0 answers
46 views

Concurrency when saving new comments

Taking a look at function comment_save() from comment.module, I can't understand how Drupal avoids duplicates when getting $max value on this statement: $max = db_query('SELECT MAX(thread) FROM {...
Enric's user avatar
  • 31
3 votes
2 answers
119 views

Change the value of a piece of content using a comment

I have a content type which I don't want a user to be able to edit once it has been created. but I want them to be able to change 1 value and the way I want them to do that is through a selection box ...
Wheelz's user avatar
  • 347
3 votes
1 answer
804 views

Problem on the comment form #validation and #submit

I've tried to create a validation and submit functions on a custom comment form, using drupal 7.9, but it's not working, and I don't know why. In the following code, we can see the "dpm's" in the ...
Antonio's user avatar
  • 31
2 votes
0 answers
357 views

Comment Notification with Message Stack / Message Notify

The message stack has three main modules: Message, Message Notify and Message Subscribe. One thing that it can do, is notifying node author of comments in their nodes. This is very much needed ...
Progonat's user avatar
  • 629
2 votes
0 answers
43 views

Is there any way to use comments for taxonomy pages?

I want to add a block like message board/chatbox in my taxonomy pages. Best and simple way to do it is comments. Is there any way to use comments for taxonomy pages?
sharktale's user avatar
  • 113
2 votes
1 answer
325 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 ...
Ali Ghasemi's user avatar
2 votes
0 answers
23 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 ...
barurumm's user avatar
2 votes
1 answer
75 views

How to remove some comments from a node?

I created a new table in the database to associate comments to the node version they were submitted against. Now when the node renders, I only want to display comments that are associated with the ...
digitgopher's user avatar
  • 1,591
2 votes
0 answers
135 views

Notice: Undefined variable: key in comment_prepare_thread() /public_html/modules/comment/comment.module)

I'm getting two errors based on comments by users that no longer exist. I just updated from Drupal 6 to 7, and this seems to be an error that pops here and there, but I can't figure out how to fix it. ...
JTB's user avatar
  • 43
2 votes
0 answers
122 views

How do I create a comment programmatically in drupal 6?

I have a comment form which gets rendered below the content type on content page. I have a comment form and comments being rendered as well. Now the question is that I have a custom form that takes ...
Prerit Mohan's user avatar
2 votes
2 answers
307 views

Body field is not displayed in Comment Views

I have a comments listing view. When I make the the row style as comments everything is displaying fine. But when I make the row style as fields and add the comment:comment field to the list, the ...
Gokul N K's user avatar
  • 6,703
2 votes
1 answer
74 views

Substitute "Your Name" field for anonymous shown on posted comments

I am using the 'Corporate Clean' theme. I have allowed anonymous posting of comments for basic pages. When a person posts, there is a an input field called 'Your Name'. However when the comment is ...
Majikins's user avatar
2 votes
0 answers
52 views

Users rate and comment each other after an event?

I'm working on a project where users trade services (like AirBNB or Uber). I'm a bit stuck at the stage when the task is done and the two users have to rate each other. I have ratings sorted using ...
Ash Ahmadzadeh's user avatar
2 votes
2 answers
299 views

Why drupal need hidden option in comment settings of content types?

In content type setting in drupal, we have tab comment setting .The comment setting on future content of this type will default to: Hidden: No comments are allowed, and past comments are hidden. ...
bigferumdron's user avatar
2 votes
1 answer
24 views

Associating comments with special pages/module output

I have what one could consider an "irregularity" in a Drupal module. I have this unique case (mostly due to vendor inconsistencies and ever-changing requirements) where when a user requests a certain ...
Cameron Kilgore's user avatar
2 votes
2 answers
2k views

How to display comments and comments form on custom node pages

I am new developing my first ever site in drupal. Along the line, due to the requirements of the project I had to create custom node pages (template files) instead of the default ones in drupal. For ...
swedge218's user avatar
  • 121
2 votes
1 answer
169 views

Comment form on a separate page

I want to have "Add new comment" link to open in a new page. I already read Placing the comment form on a separate page, but this didn't solve my problem. When I go to /comment/reply/[nid] or /comment/...
Paul26's user avatar
  • 21
2 votes
1 answer
89 views

How to hide a field of a Views row if comments are closed?

I know there are some easy tricks to hide Views fields conditionally (catchword: hide if empty). None of them seems to work for me. Also hook_views_pre_render() or other preprocess approaches didn't ...
leymannx's user avatar
  • 18k
2 votes
0 answers
120 views

Changing comment title

Drupal takes automaticaly first words of a comment like the title of the comment. Admin can modify a comment text, but there isn't apparently any place to change the title O_O! How can I change the ...
user16581's user avatar
2 votes
1 answer
83 views

Grouping Node Comment in Views

I am trying to set up the following in Views: Review 1 -Example Field -All Comments of the Review Review 2 -Example Field -All Comments of the Review I'm pulling in the comments from a ...
Noah's user avatar
  • 61
2 votes
0 answers
86 views

Add Comment after every 200 words of a node

I am creating a creative writing feedback site and would like the option for feedback to be given after every 200 words of the body of one particular node type I'm calling chapter. The writer would ...
Veronica Jorden's user avatar
2 votes
0 answers
69 views

How do I show user custom fields in the comments section?

I have three custom fields from the user accounts that I would like to display in the comments user posts: field_agencyname field_address field_phone How/Where would I be able to display this ...
Kristine's user avatar
2 votes
0 answers
392 views

How do I create a rule that publishes comments on node after 3 days?

In Drupal 7, and I am trying to make a rule that publishes comments on a node 3 days after they have been created. I had a look at this post to see if I can do this in reverse. Workflow: A ...
Q10's user avatar
  • 440
2 votes
1 answer
100 views

How can I change comment text to "DELETED" instead of actually deleting the comment?

I'm using threaded comments on my Drupal 7 site, and I'd like to be able to publicly preserve the fact that so-and-so commented here, and these were the replies. However, when a comment is deleted, ...
BenjaminRH's user avatar
2 votes
0 answers
217 views

D7 multi-role comment permission per content type - how-to?

I'd like to extend (...or create) a content type/node that allows: commenting by two or more roles though one role's members can not see the other roles' comments/replies as well as one role that is ...
esdaniel's user avatar
2 votes
1 answer
93 views

How to change comment text using hooks

Under each node there is a 'Add Comment' text. For a particular content type I want to change the text to 'review by adding comment". How do I do this?
Hacker's user avatar
  • 3,024
2 votes
0 answers
201 views

SQL connection error occasionally

I am using v7.14 and with comment module, it's observed that following SQL error appeared occasionally when posting a comment, any idea about the root cause of the issue ? The website encountered an ...
Tony's user avatar
  • 21
2 votes
0 answers
798 views

Comment pagination for D7?

I am not able to see the comment pagination section, even though I set up the comment field under structure/content-type/name/comment-field. I set the limit of number of comments to display on node to ...
user avatar
2 votes
0 answers
576 views

how to use ctools Wizard (custom modal) to show my custom form?

I look at the ctools ajax demo. there I look at the form wzards. They are so nicely displayed in popup window. I want the similar functionality for my comment form. So how can I use this functionality ...
Ahmad's user avatar
  • 2,835
2 votes
0 answers
230 views

Allow an author of a comment to see their comment listed in the comment section of a node with a notice that the comment is in moderation?

I seem to be getting a lot of duplicate comments on my site and I think it has to do with the fact that users do not see their comment right after submitting it. I have it set so that an admin must ...
user avatar
2 votes
0 answers
657 views

AJAX Login/Register and Comment forms

I'm looking for a solution to handle the comments, login and register via AJAX. Why ? Actually I'm loading my content in Overlay-Boxes and get the content with JSON-Views, but it should be possible to ...
Timo's user avatar
  • 31
1 vote
0 answers
36 views

Comments form won't appear

I'm switching a website from Disqus back to the regular Comment module. After installing the module, I can configure it just fine as an administrator and add comments on some dummy articles. But when ...
Eric Sorum's user avatar
1 vote
0 answers
129 views

How do I fetch all users in a comment thread?

I want to send notifications to users that have posted in a comment thread. I need to get the user IDs in an event subscriber that will be triggered when comments are created/edited, so performance ...
M.Anagnostopoulos's user avatar
1 vote
0 answers
223 views

How to extend existing 'access comments' permission?

I am trying to extend access to comments based on the entity they are attached to. I have created permissions in my permissions.yml file as following. view user comments: title: 'View comments ...
Lia's user avatar
  • 131
1 vote
0 answers
72 views

How to add custom query to comment entity

I have comment thread field attached into a node. I would like to have a search function by keyword. I used hook_query_TAG_alter() to add database condition according to my needs. Here's my current ...
Maddie's user avatar
  • 334
1 vote
0 answers
37 views

How to create a query nodes, that queries content with more than one comment?

Consider this example: $query = \Drupal::entityTypeManager()->getStorage('node')->getQuery(); $nids = $query->condition('type', 'question') ->condition('status', 1) ->...
ilovedrupal93's user avatar
1 vote
0 answers
28 views

Is there a way of displaying the IP address of a comment in a view?

I have created a view to help me manage spam. Its main shortcoming that it does not display the IP address the comment came from. Is there a way to obtain the IP address the comment came from? When ...
vfclists's user avatar
  • 1,269
1 vote
1 answer
70 views

Which function should I use to update a node through the comment form?

I use this function to synchronize a comment field with the value from a field that exists in the node the comment belongs to. function mymodule_comment_create(\Drupal\comment\CommentInterface $...
Ioannis's user avatar
  • 33
1 vote
0 answers
33 views

Reply on comments

My content type has a comment field with Show reply form on the same page as comments checked. Posting comments works fine; unfortunately, there is no way to reply on the comments. Can somebody ...
gtz137's user avatar
  • 11
1 vote
0 answers
40 views

How to recompute the thread numbers of comments?

My articles currently have a text field Note, but I would like to get rid of it. Instead, I want these notes to be added as a comment on the article. Therefore, I have created a Rule with the ...
Jeroen's user avatar
  • 2,518
1 vote
0 answers
46 views

How to ban a commentator's IP address with Rules?

When spammy comments appear on my website, I delete them and manually add the commentator's IP address to the banned list. However, it should be easier to Flag the comment with a new comment Flag Spam ...
Jeroen's user avatar
  • 2,518
1 vote
0 answers
52 views

Access to each comment per user level

I have a system which allows tagging users to a node. I would like to restrict the access to the comments so that the tagged user can see only the the future comments. So he cannot see the comments ...
Pramod Sivadas's user avatar
1 vote
1 answer
163 views

How to set Disqus Share link to window.location.pathname + window.location.search?

Version Disqus 8.x-1.0-rc3 Drupal 8.2.5 I have a page that is built up of multiple nodes using Twig Tweaks. One of the nodes has the Disqus comment field. Module runs smoothly and everything, ...
Yzmir Ramirez's user avatar
1 vote
1 answer
248 views

How to show comment reply form

I have installed ajax comments module. There is a "reply" link to show comment reply form. I want to show comment reply form under comments without click reply link. Is it possible?
udhaya kumar UK's user avatar
1 vote
0 answers
319 views

How do I migrate comments?

I am trying out the Migrate module, to move my site from Drupal 6 to Drupal 7, but I dont see comments being moved; just the content is migrated. How do I migrate comments too?
hentaigrl's user avatar
  • 113
1 vote
0 answers
50 views

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

The answer to "How to restrict node authors from commenting 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. {...
user14666's user avatar
  • 710
1 vote
0 answers
45 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 ...
Travis's user avatar
  • 457
1 vote
1 answer
679 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. ...
inteja's user avatar
  • 41
1 vote
0 answers
56 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?
gladiatorhl2's user avatar

1
2 3 4 5