Bug: Incorrect URL Rendering in WebChanges

The links at the bottom of the WebChanges page that show the 100, 200, 400, 800 most recent changes are broken.

  • Source: [[%SCRIPTURL%/search%SCRIPTSUFFIX%/%INCLUDINGWEB%/?search=%5C.*&scope=topic&order=modified&reverse=on&regex=on&nosearch=on&limit=100][100]]
  • Renders as: <span style='background : #FFFFCE;'><font color="#0000FF">100</font></span><a href="/cgi-bin/edit/Codev/HttpTWikiorgcgi-binsearchCodevsearch5Cscopetopicordermodifiedreverseonregexonnosearchonlimit100?topicparent=Codev.WebChanges">?</a>
  • Expected: <a href="http://twiki.org/cgi-bin/search/Codev/?search=%5C.*&scope=topic&order=modified&reverse=on&regex=on&nosearch=on&limit=100">100</a>

Test case

Look at TWiki.WebChanges and Codev.WebChanges

Environment

TWiki version: TWikiAlphaRelease
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin, etc.
Server OS: Linux at SF
Web server: Apache
Perl version: N/A
Client OS: N/A
Web Browser: N/A

-- PeterThoeny - 08 Oct 2003

Follow up

This should be fixed before the next Beta release.

-- PeterThoeny - 08 Oct 2003

Fix record

Fix is now in TWikiAlphaRelease and at TWiki.org.

The bug was introduced in TopicsInIncludedLinkToIncludingWeb, which is a fix for broken WikiWord links if topics got included from a different web. That fix did not account for URL links like [[http:/...][...]].

Patch for twiki/lib/TWiki.pm, function fixIncludeLink:

Index: TWiki.pm
===================================================================
RCS file: /cvsroot/twiki/twiki/lib/TWiki.pm,v
retrieving revision 1.240
retrieving revision 1.241
diff -C2 -r1.240 -r1.241
*** TWiki.pm    29 Sep 2003 01:15:31 -0000      1.240
--- TWiki.pm    19 Oct 2003 08:33:03 -0000      1.241
***************
*** 118,122 ****
  # ===========================
  # TWiki version:
! $wikiversion      = "28 Sep 2003";
  
  # ===========================
--- 118,122 ----
  # ===========================
  # TWiki version:
! $wikiversion      = "19 Oct 2003";
  
  # ===========================
***************
*** 1329,1342 ****
      if( $theLabel ) {
          # [[...][...]] link
!         if( $theLink =~ /^($webNameRegex|$defaultWebNameRegex)\./ ) {
!             return "[[$theLink][$theLabel]]";
          }
          return "[[$theWeb.$theLink][$theLabel]]";
  
      } else {
          # [[...]] link
!         if( $theLink =~ /^($webNameRegex|$defaultWebNameRegex)\./ ) {
!             return "[[$theLink]]";
          }
          return "[[$theWeb.$theLink][$theLink]]";
      }
--- 1329,1344 ----
      if( $theLabel ) {
          # [[...][...]] link
!         if( $theLink =~ /^($webNameRegex\.|$defaultWebNameRegex\.|$linkProtocolPattern\:)/ ) {
!             return "[[$theLink][$theLabel]]";  # no change
          }
+         # add 'Web.' prefix
          return "[[$theWeb.$theLink][$theLabel]]";
  
      } else {
          # [[...]] link
!         if( $theLink =~ /^($webNameRegex\.|$defaultWebNameRegex\.|$linkProtocolPattern\:)/ ) {
!             return "[[$theLink]]";  # no change
          }
+         # add 'Web.' prefix
          return "[[$theWeb.$theLink][$theLink]]";
      }

-- PeterThoeny - 19 Oct 2003

Topic revision: r4 - 20 Aug 2004 - 10:30:31 - CrawfordCurrie
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback SourceForge.net Logo