Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The comment form_id in the settings form don't work anymore.
Seems the form id is the same for all comment form.
Comment | File | Size | Author |
---|---|---|---|
#5 | honeypot-comments-2392507-5.patch | 2.62 KB | geerlingguy |
#4 | honeypot-comments-2392507-4.patch | 2.64 KB | geerlingguy |
#1 | add-honeypot-comment-2392507-1.patch | 1.12 KB | Bès |
Comments
Comment #1
Bès CreditAttribution: Bès commentedHere is a small fix tested on node entity only for now.
Maybe a better one should be to check all the comment bundle in the settings form since the form_id of a entity form is based on that EntityForm::getFormId()
Comment #2
geerlingguy CreditAttribution: geerlingguy commentedI'll try to get to this soon; I think it may be best to find a way to test on more than one comment form, too, just so we can make sure bugs like this don't slip past the testbot in the future.
Comment #3
geerlingguy CreditAttribution: geerlingguy commentedI'll go ahead and give the testbot a workout.
It looks like we'll have to run through 'comment' types and give a checkbox for each comment type form, rather than node/entity types. I'd like to add an automated test that adds an additional comment type and tests with both the standard 'comment' comment type and an additional one.
I just did a little testing, and the default comments form is
comments_comment_form
, and if I add a new 'Ratings' comment type, that form's ID becomesratings_comment_form
. So, confirmed that I'll need to loop through comment types rather than content types.Comment #4
geerlingguy CreditAttribution: geerlingguy commentedUpdated patch attached; this loads all comment form types and lists them as individual checkboxes.
Comment #5
geerlingguy CreditAttribution: geerlingguy commentedThis time without the debug code.
Comment #8
geerlingguy CreditAttribution: geerlingguy commentedSo I committed some of the work (getting the comment forms working), but now there's a new bug that doesn't allow inlining CSS (see #2391025: Add support for inline JS/CSS with #attached), so I'll open a new bug report for that.
Comment #9
geerlingguy CreditAttribution: geerlingguy commented