Enabling notify on custom comment types breaks comment form for some accounts

Created on 21 February 2023, almost 2 years ago
Updated 6 October 2023, about 1 year ago

Problem/Motivation

The comment form is not loading in some scenarios when a custom comment type is being used.

Steps to reproduce

  1. Log in as user 1
  2. Create a custom comment type
  3. Add a comments field on the Basic page content type that uses the custom comment type
  4. Enable Comment Notify on the newly created comment field at Configuration > People > Comment notification
  5. Add a new Basic page node
  6. Return to the Comments Notify configuration page and uncheck the "Replies to my comment" Available subscription modes option and save the form.
  7. Return to the Basic page node
  8. The comments form does not load.

Proposed resolution

TBD

Remaining tasks

  1. ❌ Reproduce the issue
  2. ❌ Decide on a solution
  3. ❌ Implement the solution
  4. ❌ Review
🐛 Bug report
Status

Postponed: needs info

Version

1.0

Component

User interface

Created by

🇺🇸United States aharown07

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @aharown07
  • 🇺🇸United States aharown07

    Disclaimer: this is an odd one. I'm not 100% sure I have the steps to reproduce right.

    At the moment, it appears I had some fact confused before, because what I observe is:
    * Custom content type node created by non-user1, custom comment type, with notify enabled:
    - non-user1 sees the comment form normally, along with the 'notify me when...' checkbox
    - user1 does not get the comment form or the 'notify me when...' checkbox
    - (user1 sees comment form normally on nodes with non-custom comment type, along with the 'notify me...' checkbox)

    * Custom content type node created by user1, custom comment type, with notify enabled:
    - non-user1 sees the comment form normally, along with the notify checkbox
    - user 1 does not get the comment form or notify checkbox
    - (user 1 sees comment form normally on nodes with non-custom comment type, as well as the 'notify me' checkbox)

    Not tested on a fresh Drupal 9 build.

    Tested for conflicts with permissions modules: uninstalled Field Permissions module, Node View Permissions module, View Unpublished module rebuilt permissions. No observable change.

    Also tested: switching theme to Olivero. The problem exists there as well.

    Probably worth noting: when I look at the page code for a page lacking the comment form, I do see "notify me when..." string in the code... but so far I can't make any sense of it.

  • 🇺🇸United States aharown07

    After more testing: some accounts see the form and some don't. User1 seems to be consistently not getting the form load.
    Other accounts... I can't see any pattern to it after a lot of messing with roles and permissions, etc.
    Two accounts with identical permissions get different results.

  • Status changed to Postponed: needs info over 1 year ago
  • 🇺🇸United States aharown07

    I am not able to reproduce the issue on a new 9.5.7 'standard' install, everything default, + this module and 1 custom comment type. There may be a conflict with some other module. Planning to test further.

  • Status changed to Active over 1 year ago
  • 🇺🇸United States aharown07

    I am able reproduce in a new install.

    TLDR: disabling the "Replies to my comment" checkbox at admin/config/people/comment_notify causes the comment form to fail to load on nodes with the custom comment type.

    Steps to reproduce:
    Standard install of 9.5.7
    Create custom comment type
    On the Basic page content type, add a new field for comments of the custom type
    Install comment_notify via composer and enable (and token comes along as a requirement)
    At admin/config/people/comment_notify, check the box for the custom comment type
    Create test nodes for Article and Basic page
    Verify that comment form loads normally for both the default comment tupe (on Article) and the custom type (on Page)
    Return to admin/config/people/comment_notify and uncheck "Replies to my comment"
    Return to test node of the Basic Page type: the comment form fails to load

  • Status changed to Postponed: needs info about 1 year ago
  • 🇺🇸United States cedewey Denver, CO

    Hi aharown07,

    I've updated the issue title and summary to reflect what you're reporting.

    I followed your steps but could not recreate the issue. This is using Drupal 10.1.5 with the Olivero theme and Comment Notify 8.x-1.x-dev. Can you double check your steps and adjust the steps to recreate as necessary?

Production build 0.71.5 2024