• 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.

Item6840: Web names that are WikiWords make for broken links when including topics across webs

Item Form Data

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

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

When refering to a topic in another web the normal syntax to use would be Web.Topic.

If the web name is a WikiWord then the link can break.

For example AfricaMap.Webhome is shown as Main.AfricaMap

-- TWiki:Main/PeterJones - 2012-01-25

This is confirmed. To reproduce:

  • Create topic with WikiWords in the Sandbox web
  • Include that topic into a topic that resides in another web
  • Links get fixed as follows:
    • WebNotify to Sandbox.WebNotify (OK)
    • Main.WebNotify to Main.WebNotify (OK)
    • WikiWordWebName.WebNotify to Sandbox.WikiWordWebName.WebNotify (bug) - expected WikiWordWebName.WebNotify

-- TWiki:Main.PeterThoeny - 2012-01-26

This is now fixed in SVN trunk and TWiki-5.1 branch.

--- TWiki.pm   (revision 22576)
+++ TWiki.pm   (working copy)
@@ -2063,8 +2063,12 @@
     my $fromWeb = $options->{web};
 
     unless( $options->{in_noautolink} ) {
+        # Prefix web name to WikiWord to make links work, such as:
         # 'TopicName' to 'Web.TopicName'
+        # TWikibug:Item6840: Exclude 'WikiWordWeb.TopicName' using translation token
+        $text =~ s/(?:^|(?<=[\s(]))($regex{webNameRegex}\.($regex{wikiWordRegex}|$regex{abbrevRegex}))/-$TranslationToken$1)/go;
         $text =~ s#(?:^|(?<=[\s(]))($regex{wikiWordRegex})#$fromWeb.$1#go;
+        $text =~ s/-$TranslationToken//go;
     }
 
     # Handle explicit [[]] everywhere

-- TWiki:Main.PeterThoeny - 2012-01-26

ItemTemplate
Summary Web names that are WikiWords make for broken links when including topics across webs
ReportedBy TWiki:Main.PeterJones
Codebase ~twiki4, 5.1.1
SVN Range TWiki-5.1.0, Wed, 11 Jan 2012, build 22471
AppliesTo Engine
Component

Priority Normal
CurrentState Closed
WaitingFor

Checkins TWikirev:22595 TWikirev:22596
TargetRelease patch
ReleasedIn 5.1.2
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2012-10-07 - PeterThoeny
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback