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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pc-wurm created an issue. See original summary.

Elin Yordanov’s picture

Status: Active » Needs review
FileSize
428 bytes

Here's the patch.

Please review.

podarok’s picture

Issue summary: View changes
Status: Needs review » Fixed

Thanks, merged

  • podarok committed ad7b4be on 7.x-2.x authored by pc-wurm
    Issue #2612528 by pc-wurm: "Quick reply" link doesn't work if the...
Elin Yordanov’s picture

Status: Fixed » Needs work

I'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:

Notice: Undefined index: comment_form in advanced_forum_get_reply_link() (line 862 of /httpdocs/sites/all/modules/advanced_forum/advanced_forum.module).

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.

Elin Yordanov’s picture

  • podarok committed beb844e on 7.x-2.x authored by Елин Й.
    Issue #2612528 by Елин Й.: "Quick reply" link doesn't work if the...
podarok’s picture

Status: Needs review » Fixed

Thanks, fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.