Closed (outdated)
Project:
Drupal core
Version:
11.x-dev
Component:
comment.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
7 Jan 2011 at 07:43 UTC
Updated:
7 Nov 2025 at 17:00 UTC
Jump to comment: Most recent
Comments
Comment #1
berdirYou can hide the filed in the content type settings, in the "Comment settings" vertical tab, uncheck the "Allow comment title" checkbox.
Comment #2
aspilicious commentedBerder I ran into the same issue he has *I think*.
If you don't allow the comment title, you can't choose a title, but in Bartik when your comment is saved it takes the first sentence of your comment as the title. Very ugly. I edited Bartik so it wouldn't show the title.
Example:
--------
Hello this is a
Hello this is a comment!
Comment #3
jcisio commentedI think this should be a feature request. When the title is empty, don't create a default title.
What I do in D6 and D7 is the following:
- Use hook_form_alter() to add a
array_unshift($form['#submit'], 'mymodule_modify_comment');- In mymodule_modify_comment(), check if
$form_state['values']['subject']is empty then replace it with a special string, like '(empty title)'- Use hook_comment (hook_comment_view) to replace this special string to an empty string
Drupal is so powerful and flexible, but I think we need a simple option that doesn't create a default title when empty :-) Or should I make this a contrib module?
Comment #4
aspilicious commentedWe can close this by design than...
Comment #5
jcisio commentedComment #6
jhedstromBeen a while since this was updated. Anything left to be done?
Comment #7
jonathanshawBerdir's #1 no longer applies in D8, but #2227503: Apply formatters and widgets to Comment base fields would make the visibility of the subject configurable in D8.1.
Showing/hiding the subject depending on whether it was auto-generated or not seems like a specialised use case that should be handled in contrib (or by Rules etc.), doesn't need to be in core. Especially given the drive to focus the core comments module on providing an API framework not a solution to every possible site need.
The residual issue that is appropriate for core is that the out-of-the-box appearance is ugly because the subject field (although configurable) is visible by default. I propose the solution to this is for the subject to be hidden by default on the default display mode of the default comment type
Forums have their own comment type so I suggest are out-of-scope for this issue.
(#2312329: Hide the comment "subject" field by default on this subject had converged to be a duplicate of #2227503: Apply formatters and widgets to Comment base fields, so I closed it as a duplicate, and suggest discussing the question of what should be default in this issue instead).
Comment #8
jonathanshawComment #9
jonathanshawComment #10
jonathanshawComment #26
smustgrave commentedThank you for sharing your idea for improving Drupal.
We are working to decide if this proposal meets the Criteria for evaluating proposed changes. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or there is no community support. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #27
smustgrave commentedSince there's been no follow up and a feature request going to close out. Can always be re-opened