Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [comments]

Use it for questions about entity comments.

0
votes
0answers
8 views

How to add custom action to OPERATION dropdown in comment page?

In /admin/content/comment page, under "OPERATIONS", there is a dropdown menu with edit and delete actions for each comment, how can I add a custom action, such as Email in the dropdown menu? Any help ...
0
votes
1answer
15 views

override view Use administration toolbar

i have a view that using administration toolbar. Problemis theme suggestion is not showing the template names that should override the template. i guess because its using the administration toolbar .. ...
0
votes
0answers
11 views

Comment body not displaying

I have an interesting problem where the comment body does not appear with the comment. The field wrapping is in the HTML but the content portion is always blank. This problem occurs regardless of the ...
0
votes
1answer
19 views

comments module with infinite scroll

I've added a comment field to my content type. Now I'd like to add infinite scroll to the comments messages, so it shows by default some number of comments and when I click on the load more button, it ...
0
votes
0answers
12 views

Comment API Endpoint for restful module drupal 7 not working

I am trying to put comment to a node using POST method to the endpoint api/v1.1/comments Here is the API file: <?php /** * @file * Contains \Drupal\restful_example\Plugin\resource\comment\...
0
votes
0answers
15 views

Understanding the threading functionality of comments

I'm working on building my own module, and it uses functionality similar to comments, so I'm trying to use it as a reference. My module uses replies, which are 'threaded' to a parent reply. There ...
0
votes
0answers
23 views

How to integrate two modules

I'm currently working on modifying https://www.drupal.org/project/react_comments module to support https://www.drupal.org/project/comment_notify. I need advice. Comment Notify module marks comments ...
0
votes
0answers
14 views

change Comments per page

I need to change the comments per page value, I set it 50 from the field setting but in some pages, I need showing only 10 comments, not 50. I tried to use this method setSettings([ 'per_page' =...
0
votes
0answers
12 views

How to move comment submit button inside fieldset

I created a new group for a content type under Comments Fields (admin/structure/types/manage/page/comment/fields), and set the type Fieldset. Is there a way to move the comment Submit Button inside ...
-2
votes
0answers
11 views

comments links not rendered after ajax

I loaded comments via jquery ajax .load() and include it to div, comments loaded fine but links such as "reply, edit, delete" not loaded, anyone has an idea what's the problem?
0
votes
0answers
9 views

How do I create a link for unapproved comments of an article?

In addition to the default links (Delete, Edit, Reply, Approve), how do I create a link such as "Email" for unapproved comments of an article(ex: /comment/12#commnet-12)?
0
votes
0answers
17 views

How do I name the comment.tpl.php file to use it in my own theme?

I have copied comment.tpl.php from mytheme/modules/comment into root/sites/all/themes/mytheme/templates. What should I name it to override the core template? The form ID is places-to-go-entry. I ...
0
votes
1answer
22 views

How do I fix the errors I get after removing the comment field from a content type?

After I removed the comment field from the user interface, and uninstalled the Comments module, I can't open any Article node. In the Drupal log, I find this message. InvalidArgumentException: ...
0
votes
2answers
116 views

How to render author custom fields info on comment and node twig template?

I am trying to render the author Full Name and other authors customs fields information in comment.html.twig and node.html.twig. But not any of the fields that I made for users such as "First Name", "...
0
votes
0answers
21 views

How to specify the text format for comments? [duplicate]

I have created a custom text format for my comment type, where the user can have just few formatting tools when adding a comment. But in fact the user still can switch to Basic HTML under Text Format ...
1
vote
2answers
44 views

How can I leave Subject as blank when fill nothing in the subject field of a comment?

When we fill nothing in the subject field of comment, drupal will use the comment body as the value of subject. See the code in CommentForm::buildEntity // Validate the comment's subject. If not ...
0
votes
0answers
39 views

Displaying same username for all users with a specific role as comment author

I need to display the same username for users of a specific role as comment author. I have a Role 'Board Moderator'. When users with this role are commenting, a uniform name 'OneUserNameForAll' ...
1
vote
1answer
33 views

How to create a view to count comments per user?

I am trying to create a view with a table that shows all the users and the total number of comments that user posted in descending order. I am not sure what I am doing wrong but I spent hours on this ...
0
votes
0answers
44 views

What's the correct way to create a custom formatter for a comment?

I'd like to create a custom formatter for the field Comments. My goal is to display a custom comments section beside CKEditor (URL /node/xx/edit). Following this article, I created my custom module: ...
0
votes
0answers
43 views

Comment file upload not working

Looks like we have two versions of jQuery loading. Hence the "(...).once is not a function" errors in the console. jquery.once is definitely loaded but only for the first version of jQuery. Nightmare....
-1
votes
1answer
92 views

How to add reply link under every comment?

I using standart Drupal 8 module for comments. Can I add reply link under comments or I have to install another module? I'm log in as administrator, but i dont see edit/delete/reple link Help please!...
0
votes
1answer
23 views

Can not use a comment display mode

In my comment type, I created a "teaser" view. When I enable the debug mode in the "service.yml" file, the display modes of the comments do not appear in the suggestions. Why ? How to use a ...
0
votes
2answers
338 views

Validation with hook_form_alter()

In Drupal 8, for the Comment entity, I want to validate an integer field (stored as field_nieuwe_waarde_value). In each comment posted for a node, it needs to be greater than the value for the ...
0
votes
1answer
78 views

Why are the edit/delete/reply links missing in the Comment module?

I'm using 8.6.0 core's Comment module. I can add comments, but I can't edit or delete them. I also can't reply to anyone else's. Permissions have been set that all authenticated roles can edit. I'm ...
0
votes
1answer
33 views

Anonymous users skip comment approval but they shouldn't

In my drupal 8.6.1 news blog anonymous users can skip comment approval althouth permissions are set to not skip. I rebuilt the permissions but nothing changed. Also in comments page I see that some ...
0
votes
2answers
57 views

Custom submit handler stops working when checking route

I'm trying to setup a custom submit handler, so I can change the redirect URL after submitting comments. Edit: I just want to send users back to the page they were viewing to begin with, but it's a ...
2
votes
1answer
47 views

How to implement per user caching when restricting display of comments by author

I have threaded comments on a site where there are two roles, reviewers and administrators. Comments are shown in a view block added to the node (in this case a webform). The view format is set to '...
2
votes
1answer
279 views

Why doesn't the token for the node title work?

In Drupal 8, I activated the Message module and the Message Example sub-module. These are the fields I added to the template to create a message when a new comment is created. This is the ...
1
vote
3answers
426 views

How can I get all comments for a node?

I have have a content type (Stuff) with an entity reference field (comments) for comments (their type is Stuff comments) with a single field (comment_body). Inside a controller, I loaded a node by ...
0
votes
0answers
10 views

Comments on Arabic version of page are not shown under content after admin approval

I am working with drupal8 website. Here am using both arabic and english translation. Authenticated users have the permission to post and view the comments. When an auhenticated user posted a comment ...
0
votes
1answer
36 views

Why do users with permission to post commenst get “You do not have permission to post a comment”?

I have some users with roles administrator, authenticated etc. All such user roles have permission to post a comment. But when posting a comment it is showing error "You do not have permission to ...
0
votes
0answers
38 views

Make forum comments search result links redirect to related topic

We have built an intranet with Drupal 8 and this has been upgraded to 8.5x, it uses forums extensively (one of the intranet's main purposes). We are also using Solr search so we can search all content ...
0
votes
1answer
128 views

Author image in comments twig

I succesfully get user name, surname and date to render in comment.html.twig like this function MYTHEMENAME_preprocess_comment(&$variables) { $comment = $variables['comment']; $variables['...
-1
votes
1answer
37 views

How to get top 5 user according to comment post? [closed]

I have a site which has a blog content type. In blog detail page users post comments. Only Authenticated user submit comment. Now I want to show top 5 users who post most comment on site.
1
vote
0answers
20 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 ...
0
votes
0answers
14 views

Comment_body not saved correct

I have 2 forms in 2 seperate modules. Each module has an own custom comment form. Form A is working perfect but Form B which is a copy of A is saving the comment_body field as regular text instead. ...
0
votes
2answers
197 views

Cycle comments on field--comment.html.twig

I would like to add a div for every comment on my field--comment.html.twig On the template I've a "comments" variable, but if I cycle in this way, I obtain error (Fatal error: "0" is an invalid ...
-2
votes
2answers
44 views

Match Users skills [closed]

I am designing a website and there are two users 1:users and 2:company. I want two field in different account need to match with each other. If users provide specific SKILLs and company requires ...
1
vote
1answer
22 views

Last Comment Name field is not removed after account cancellation

After cancelling the user under(Delete the account and make its content belong to the Anonymous user). Forum posted by is changed to "Anonymous" but comment name is still displayed in the forum. ...
1
vote
1answer
126 views

Drupal 8, make comment subject a required field

I am pretty new to Drupal and simply cant figure it out. I've set up a comment type for a content type. I want to use the default subject field as comment title and want to make it required. I know, ...
0
votes
1answer
113 views

Fatal error: Call to undefined function node_type_get_names() Drupal 7.59

I upgraded my Drupal site to Drupal 7.59 and now the site is down. Fatal error: Call to undefined function node_type_get_names() in D:\Development\xampp\htdocs\biobank\modules\comment\comment.module ...
1
vote
1answer
150 views

Disabling reply link for comments not working

I would like to disable reply to comment for anonymous user. I saw on sereval topics that you have to unset $variables['content']['links']['comment']['#links']['comment-reply'] So I ended up ...
0
votes
1answer
74 views

Views field that links to fragment URL of comment on /node/ instead of /comment/

With Views, I want to output a list that links to each comment of the current node. But instead of linking to /comment/42#comment-42 I want to link to /node/23#comment-42 I tried these fields, ...
1
vote
2answers
334 views

Comment template for specific comment type

How can I have a comment template (comment.html.twig) per comment type? The Twig Template naming conventions documentation explains how I can get a comment template per node content type (comment--...
1
vote
1answer
334 views

Add comments to Webform submissions

I'm trying to figure out allow commenting on the submissions so there can be a back and forth dialog between the user and site admin(s). In Drupal 8 webform submissions are entities (type: ...
0
votes
1answer
183 views

How to display the profile url in the comments?

I have the module : https://www.drupal.org/project/profile https://www.drupal.org/project/twig_tweak Here is the twig file of my comments : {# /** * @file * Default theme implementation for ...
0
votes
1answer
36 views

Allows users to pass from flat to threaded view for forum comments

We've migrated a site from Drupal 5 to Drupal 7, and we were unable to figure out how to allow user to change between flat and threaded view for the forum comments. This was possible in Drupal 5, but ...
0
votes
1answer
133 views

Can I manually migrate comments?

I have a Drupal 7 site and I'm thinking about upgrading it to Drupal 8. I want to refactor the site, so I just need to export the content. So far, I've tested exporting content types using feeds ...
1
vote
1answer
263 views

Json api create comments

I am using the JSON API module and I would like to create a comment. I was able to create nodes based on the documentation found here, but I can't figure out how to create comments. How can I add a ...
1
vote
1answer
231 views

Multilingual comments in Drupal 8

I set up an English/Arabic Drupal 8 website. However, comments are misbehaving. When a user enters a comment in the English version of the article, it appears in the Arabic version, and vice versa. I ...