Comment form shows wrong fields

Created on 17 June 2024, 3 months ago

Problem/Motivation

For some reason a site I'm building doesn't show the comment fields correctly on a forum page where it should show up.

Comments are configured to use the "comment_forum" comment type. The data is migrated from a D7 site and is visible on the page.

The comment default form view mode is configured to display the author and body but hide the subject field.

Viewing a node page shows the comment form with the subject line and submit button, but no body field, and no author field when the user has the appropriate permissions.

Steps to reproduce

Install the Comment module on a site, along with the Forum module.
Create a form node (forum topic).
View the node form.

Proposed resolution

Work out the source of the problem.
Fix it.

Remaining tasks

Work out the source of the problem.
Fix it.

User interface changes

Comment fields display correctly on a forum node.

API changes

TBC

Data model changes

TBC

Release notes snippet

TBC

πŸ› Bug report
Status

Closed: works as designed

Version

10.2 ✨

Component
CommentΒ  β†’

Last updated 1 day ago

Created by

πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

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

Comments & Activities

  • Issue created by @DamienMcKenna
  • Assigned to DamienMcKenna
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    I'll log what I find as I trace my way through the problem.

  • Issue was unassigned.
  • Status changed to Closed: works as designed 3 months ago
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    The problem was when I shoehorned a migrated configuration for the comment system to work with the forum module, that expects the forum comments to use the comment bundle "comment_forum", this setting on the field storage was incorrect:

    settings:
      comment_type: comment
    

    It needed to be this:

    settings:
      comment_type: comment_forum
    

    Once I changed that and re-loaded the configuration, everything worked as expected.

Production build 0.71.5 2024