Allowing comment editing in Drupal 8

By default, once a comment is submitted in Drupal 8, it can only be edited by administrators. You may want to give your members the ability to edit their own comments in case they make any errors. Follow along with the instructions below to learn how to allow editing permissions for user comments.

How to allow users to edit their own comments

  1. Log into your Drupal 8 admin interface.
  2. Look to the top menu bar on the page and click on the Menu tab.

  3. From the second menu bar, click on the People option.

  4. menu list before the change

    Now you will see a list of all current members for your site. Looking to the upper right corner of the page you will see two tabs. Click on the Permissions tab.

  5. menu list before the change

    From the Permissions screen, look to the Comment section and check the checkboxes for the user groups you want to allow to edit their comments for the Edit one comments permission. By default, only the Administrator group has this ability. In this example, we are giving the Authenticated User group this ability as well.

  6. Once you have selected the user groups you want to allow editing, click on the Save Permissions button at the bottom of the page to activate the permission change. Now, when a registered user adds a comment, they will also have the ability to edit that comment. Below is an example of a comment created by a registered user both before and after the editing permissions are assigned. You can see that the Edit link has been added to the comment area.
    BeforeAfter
    menu list before the change

    menu list before the change

Was this article helpful? Join the conversation!