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 fragment id of comment form is at the moment hard coded as comment-form
. This doesn't work if the comment form gets another id, like 'comment-form--2', which is very possible, since those id's are generated via drupal_html_id
.
I've created a very small patch, which takes the id of the comment form, from the $node
object, which is already passed as argument to the advanced_forum_get_reply_link()
function
Comments
Comment #2
Elin Yordanov CreditAttribution: Elin Yordanov commentedHere's the patch.
Please review.
Comment #3
podarokThanks, merged
Comment #5
Elin Yordanov CreditAttribution: Elin Yordanov commentedI've just found a new minor bug introduced by this patch.
If a topic is locked, there is no comment form, i.e.
$node->content['comments']['comment_form']
is not defined. That results in notices in logs:It is better to check if a post is locked, before assigning the comment form id. My time is limited now, but the patch would be very simple. If I get a bit more time tomorrow, I'll post a new patch.
Comment #6
Elin Yordanov CreditAttribution: Elin Yordanov commentedHere's new patch
Comment #8
podarokThanks, fixed