Item15011: ExternalLinkPlugin does not always display internal links correctly when LinkOptionsPlugin is installed.

pencil
Priority: Normal
Current State: New
Released In: n/a
Target Release:
Applies To: Extension
Component: ExternalLinkPlugin
Branches:
Reported By: JohnEdge
Waiting For:
Last Change By: JohnEdge
-- JohnEdge - 20 Jan 2021

Summary (edited to add note on tables)

On a Foswiki instance where both ExternalLinkPlugin and LinkOptionsPlugin area installed, then if there are Internal and and External link on the same line then ExternalLinkPlugin behaves like this:-
  • External links all correctly tagged
  • Internal links on the line AFTER any External links are handled correctly (so does not get the Ext link icon)
  • BUT Internal links on same line BEFORE any External links are incorrectly tagged as being External
  • Comparable behaviour in tables - issues arise when there are both Int and Ext links in same Cell. Problem not seen when there are (for instance) Int links and Ext links in different cells in same row of table.

System details

  • System: FOSWIKI 2.1.6
  • Link related plugins installed: ExternalLinkPlugin, LinkOptionsPlugin
  • The LinkOptionsPlugin allows wikitext URLs to be coded with three square bracket blocks. The third block is typically used to specify a target window or tab for the link, eg
    [[https://www.google.com][Link to Google][Name:=_blank]]

Examples

The Foswiki.org instance does have ExternalLinkPlugin installed, so external links get the extra icon image when rendered, like this:- Example of External Link.

But the Foswiki.org instance does not have LinkOptionsPlugin installed, so cannot demonstrate the problem directly here.

Below is the wikitext, and a screenshot of how this appears on a FOSWIKI instance with both ExternalLinkPlugin and LinkOptionsPlugin installed.

New edit 27-Jan-2021 - added another example, this time where the External link does not have a third square bracket block. It behaves the same - so issue arises when LinkOptionsPlugin is installed, even if the relevant External link does NOT have a third square bracket block.

ExtLinkSS.PNG
Example screenshot of incorrect handling of Internal links
ExtLinkSS 2.PNG
Another example screenshot of incorrect handling of Internal links

   * These situations it works ok
      * Two links: Ext, Ext: [[https://wwww.google.com][ExtLink][Name:=_blank]] - [[https://wwww.google.com][ExtLink][Name:=_blank]]
      * Two links: Int, Int: [[WebHome][Foswiki Internal link]] - [[WebHome][Foswiki Internal link]]
      * Two links: Ext, Int: [[https://wwww.google.com][ExtLink][Name:=_blank]] - [[WebHome][Foswiki Internal link]]
   * *But this one does not, the Internal link shows as External*
      * Two links: Int, Ext: [[WebHome][Foswiki Internal link]] - [[https://wwww.google.com][ExtLink][Name:=_blank]]


   * This situation works ok
      * Three links: Ext, Ext, Int: [[https://wwww.google.com][ExtLink][Name:=_blank]] - [[https://wwww.google.com][ExtLink][Name:=_blank]] - [[WebHome][Foswiki Internal link]]
   * *But these ones do not, any Internal links occurring on a line before a later External link is incorrectly tagged as External*
      * Three links: Ext, Int, Ext: [[https://wwww.google.com][ExtLink][Name:=_blank]] - [[WebHome][Foswiki Internal link]] - [[https://wwww.google.com][ExtLink][Name:=_blank]]
      * Three links: Int, Ext, Int: [[WebHome][Foswiki Internal link]] - [[https://wwww.google.com][ExtLink][Name:=_blank]] - [[WebHome][Foswiki Internal link]]
      * Three links: Int, Int, Ext: [[WebHome][Foswiki Internal link]] - [[WebHome][Foswiki Internal link]] - [[https://wwww.google.com][ExtLink][Name:=_blank]]

   * Another example with three links. But the *Ext link does NOT have the third square bracket block* (which is what LinkOptionsPlugin enables).
      * Three links, Int, Ext, Int: [[WebHome][Foswiki Internal link]] - [[https://wwww.google.com][ExtLink (no third block)]] - [[WebHome][Foswiki Internal link]]


 

ItemTemplate edit

Summary ExternalLinkPlugin does not always display internal links correctly when LinkOptionsPlugin is installed.
ReportedBy JohnEdge
Codebase
SVN Range
AppliesTo Extension
Component ExternalLinkPlugin
Priority Normal
CurrentState New
WaitingFor
Checkins
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release02x01Checkins
Release02x00Checkins
Release01x01Checkins
I Attachment Action Size Date Who Comment
ExtLinkSS.PNGPNG ExtLinkSS.PNG manage 40 K 20 Jan 2021 - 14:01 JohnEdge Screenshot of showing situations when ExternalLinkPlugin works incorrectly on Internal links
ExtLinkSS_2.PNGPNG ExtLinkSS_2.PNG manage 8 K 27 Jan 2021 - 16:36 JohnEdge Screenshot of another use case for ExternalLinkPlugin not working right
Topic revision: r3 - 27 Jan 2021, JohnEdge
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