You are here: Foswiki>Tasks Web>Item14009 (18 Feb 2017, GeorgeClark)Edit Attach

Item14009: Comment plugin does not properly identify location to insert comment.

Priority: Normal
Current State: Closed
Released In: 2.1.3
Target Release: patch
Applies To: Extension
Component: CommentPlugin
Branches: Release02x01 master Item14288
Reported By: PaulMerchantJr
Waiting For:
Last Change By: GeorgeClark
There are several problems with the handling of the target parameter by the comment plugin when the target is given as a URL fragment ("#anchor").

  1. The anchor is being passed via a hidden form field to the comment plugin's Javascript. This value includes the "#" fragment delimiter, but the Javascript does not take this into account and searches for an anchor tag with a name that includes the delimiter. This fails.
  2. For named anchors, Foswiki now generates span tags with an id attribute for the given name. The comment plugin's Javascript does not take this into account.

I'll attach a patch to comment.uncompressed.js that addresses both of these problems.

-- PaulMerchantJr - 07 Mar 2016

Thanks for the fix!

Crawford, could you please review this and I'll get it checked into Foswiki 2.1.1? Thanks.

-- GeorgeClark - 13 Mar 2016

Yes, looks like a good fix. Sorry for taking so long to get to this!

-- Main.CrawfordCurrie - 21 Jan 2017 - 08:59

ItemTemplate edit

Summary Comment plugin does not properly identify location to insert comment.
ReportedBy PaulMerchantJr
Codebase 2.1.3 beta1, 2.1.2, 2.1.1, 2.1.0, 2.0.3, trunk
SVN Range
AppliesTo Extension
Component CommentPlugin
Priority Normal
CurrentState Closed
Checkins distro:ca77c756ba83
TargetRelease patch
ReleasedIn 2.1.3
CheckinsOnBranches Release02x01 master Item14288
masterCheckins distro:ca77c756ba83
ItemBranchCheckins distro:ca77c756ba83
Release02x01Checkins distro:ca77c756ba83
I Attachment Action Size Date Who Comment
comment.uncompressed.js.patchpatch comment.uncompressed.js.patch manage 697 bytes 07 Mar 2016 - 16:46 PaulMerchantJr Patch to address handling of target parameter
Topic revision: r8 - 18 Feb 2017, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy