• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item6463: InterwikiPlugin links not working if topic included from different web, such as if used in TopMenuSkin menus

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine INCLUDE Normal Closed   patch 5.0.1

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


Unfortunately TWiki:Plugins/TopMenuSkin and TWiki:Plugins/InterwikiPlugin do not work together in WebTopMenu.


file WebTopMenu.txt


If one opens WebTopMenu itself, the Interwiki link is resolved as expected, but if any topic in the web is opened, the link in the top menu is highlighted red and would create a new topic on click.

-- TWiki:Main/RobertLaufer - 18 May 2010

I can't reproduce it on my installation. Interwiki links work as expected in the following menu if put into a WebTopMenu:

   * [[TestMenu][Test Menu]]
      * Google:foobar
      * [[Google:foobar][foobar on Google]]

You are indicating codebase ~twiki4, e.g. SVN trunk. Is this the case? What TWiki version do you use?

-- TWiki:Main.PeterThoeny - 19 May 2010

I'm using TWiki-5.0.0-rc3. In your example the first line is working also for me, but not the second one.

-- TWiki:Main.RobertLaufer - 19 May 2010

I can confirm the bug now. Thanks for reporting!

-- TWiki:Main.PeterThoeny - 19 May 2010

This happens to be a core TWiki bug. I changed the summary to reflect the scope change.

The bug only exists for [[Site:page]] links, but for plain Site:page links.

To reproduce:

  • Create a topic in Sandbox web with [[TWikibuf:Item6463]] link
  • Include that topic from another topic in the Sandbox web: Links is OK
  • Include that topic from another topic in the Main web: Links fails (incorrectly shown as red-link to a new topic in Sandbox web)


--- TWiki.pm   (revision 18879)
+++ TWiki.pm   (working copy)
@@ -429,6 +429,9 @@
     $regex{defaultWebNameRegex} = qr/_[$regex{mixedAlphaNum}_]+/o;
     $regex{anchorRegex} = qr/\#[$regex{mixedAlphaNum}_]+/o;
     $regex{abbrevRegex} = qr/[$regex{upperAlpha}]{3,}s?\b/o;
+    # used by _fixIncludeLink: (the last OR pattern is for Interwiki link fix Item6463)
+    $regex{excludeFixIncludeLinkRegex} =
+        qr/($regex{webNameRegex}\.|$regex{defaultWebNameRegex}\.|$regex{linkProtocolPattern}:|\/|[$regex{upperAlpha}][$regex{mixedAlphaNum}]+:)/o;
     # Simplistic email regex, e.g. for WebNotify processing - no i18n
     # characters allowed
@@ -2024,8 +2027,8 @@
 sub _fixIncludeLink {
     my( $web, $link, $label ) = @_;
-    # Detect absolute and relative URLs and web-qualified wikinames
-    if( $link =~ m#^($regex{webNameRegex}\.|$regex{defaultWebNameRegex}\.|$regex{linkProtocolPattern}:|/)#o ) {
+    # Detect absolute and relative URLs, web-qualified wikinames and Interwiki links
+    if( $link =~ m/^$regex{excludeFixIncludeLinkRegex}/o ) {
         if( $label ) {
             return "[[$link][$label]]";
         } else {

-- TWiki:Main.PeterThoeny - 05 Jun 2010

Summary InterwikiPlugin links not working if topic included from different web, such as if used in TopMenuSkin menus
ReportedBy TWiki:Main.RobertLaufer
Codebase 5.0.0, ~twiki4
SVN Range TWiki-5.0.0-rc3, Mon, 17 May 2010, build 18715
AppliesTo Engine
Component INCLUDE
Priority Normal
CurrentState Closed

Checkins TWikirev:18913 TWikirev:18914
TargetRelease patch
ReleasedIn 5.0.1
Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r10 - 2010-10-12 - PeterThoeny
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback