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

Bug: Creating a new web fails due to missing files

If you use the (very nice) script for creating a new web from a default web, it fails if there is a .txt file in the default web that doesn't have a corresponding .txt,v file.

Test case

As an example, I get:

Create New Web
Error: Could not copy topics to the new web

The new web has been created, however not all topics could be copied from the
base web.

Error message: Copy file (
/var/www/UMMCSciWiki/data/_nicsDefault/NicsContactInfo.txt,v,
/var/www/UMMCSciWiki/data/CSci3601f03/NicsContactInfo.txt,v ) failed, error: No
such file or directory 
where in this case:
  • _nicsDefault is the default that we're copying
  • CSci3601f03 is where we're copying to
  • NicsContactInfo is the page that doesn't have a .txt,v version

This strikes me as unfortunate behavior; it sure confused me quite a lot, and I spent too much time assuming it was somehow a permissions issue (which is in part because I didn't read the error message carefully :-<). Is there a good reason for this behavior? Should we assume that the lack of a ,v version of a file is an error and die?

Environment

TWiki version: Beijing
TWiki plugins: Loads, but I don't think they're an issue here
Server OS: Linux
Web server: Apache
Perl version: 5.8.0
Client OS: Linux
Web Browser: Mozilla

-- NicMcPhee - 16 Jun 2003

Follow up

Fix record

This was fixed on 02 Mar 2004:

% cvs log manage
revision 1.10
date: 2003/04/02 07:58:50;  author: peterthoeny;  state: Exp;  lines: +6 -4
create web does not require rcs ,v file

Patch:

*** bu1/manage  Sat Jan  4 18:25:47 2003
--- manage      Tue Apr  1 23:55:42 2003
***************
*** 231,241 ****
      # FIXME: Hack, no support for RCS subdirectory
      $from .= ",v";
      $to .= ",v";
!     unless( copy( $from, $to ) ) {
!         return( "Copy file ( $from, $to ) failed, error: $!" );
      }
-     umask( 002 );
-     chmod( 0644, $to );

      # FIXME: Copy also attachments if present

--- 231,243 ----
      # FIXME: Hack, no support for RCS subdirectory
      $from .= ",v";
      $to .= ",v";
!     if( -e $from ) {
!         unless( copy( $from, $to ) ) {
!             return( "Copy file ( $from, $to ) failed, error: $!" );
!         }
!         umask( 002 );
!         chmod( 0644, $to );
      }

      # FIXME: Copy also attachments if present

-- PeterThoeny - 18 Jun 2003

Topic revision: r3 - 2008-09-16 - TWikiJanitor
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by PerlIdeas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.