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

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2005-11-29 - MikeOliver
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.