Tags:
archive_me1Add my vote for this tag duplicate1Add my vote for this tag create new tag
, view all tags

Bug: [short description]

When looking for versions of the atachement, the version 1.1 is unaccesible.

Test case

Environment

TWiki version: TWikiRelease02Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Debian 3.0 Woody, kernel 2.4.25 + VServer
Web server: apache-ssl 1.3.26.1+1.48-0woody3
Perl version: perl 5.6.1-8.9
Client OS:  
Web Browser:  

-- RadekHnilica - 24 Jun 2005

Impact and Available Solutions

Follow up

 

Today contacted me one men asking If I can help him with atachments in TWiki. He says that he was not able get older versions of his atachments. After reproducing that error I found a very strange code line in Attach.pm file. So I quickly change the code and it seems that now it's allright. Please look at the patch.

Fix record

kiki:/tmp/twiki/lib/TWiki# diff -u Attach.pm.orig Attach.pm
--- Attach.pm.orig      Fri Jun 24 14:03:26 2005
+++ Attach.pm   Fri Jun 24 14:04:18 2005
@@ -179,7 +179,7 @@
   if ( $row =~ /%A_URL%/o ) {
        my $url;
 
-       if ( $topRev || $rev eq "1.1" ) {
+       if ( $topRev ) {
          # I18N: To support attachments via UTF-8 URLs to attachment
          # directories/files that use non-UTF-8 character sets, go through viewfile. 
          # If using %PUBURL%, must URL-encode explicitly to site character set.

Discussion

this looks correct to me; this same fix has been previously applied to DakarRelease. you might find this bit lifted from DakarRelease useful to compare against your patch:

    elsif ( $attr eq 'URL' ) {
        my $url;

        if ( $topRev ) {
            # I18N: To support attachments via UTF-8 URLs to attachment
            # directories/files that use non-UTF-8 character sets, go
            # through viewfile.
            # If using %PUBURL%, must URL-encode explicitly to site
            # character set.
            $url = TWiki::nativeUrlEncode( "$TWiki::cfg{PubUrlPath}/$web/$topic/$file" );
        } else {
            $url = $this->{session}->getScriptUrl
              ( $web, $topic, 'viewfile',
                rev => $info->{version}, filename => $file );
        }
        return $url;
    }

-- WillNorris - 25 Jun 2005

This is a duplicate of AttachmentVersionsBrokenOnlyShowsLast.

-- MikeOliver - 29 Nov 2005

 
Topic revision: r3 - 29 Nov 2005 - 22:50:55 - MikeOliver
 
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