Tags:
create new tag
, view all tags

Question

When creating a topic containing spaces, I get this error:

Topic save error 
During save of file Sandbox.Fis er godt an error was found by the version control system. Please notify your TWiki administrator. 
/usr/bin/ci -q -l -m'none' -t-none -w'PeterMorch' /home/groups/t/tw/twiki/p/data/Sandbox/Fis er godt.txt 2>&1
ci: /home/groups/t/tw/twiki/p/data/Sandbox/Fis: No such file or directory
ci: er,v: Permission denied
ci: godt.txt,v: Permission denied

(I tried this on www.twiki.org, and there is now presumably a '/home/groups/t/tw/twiki/p/data/Sandbox/Fis er godt.lock' and a /home/groups/t/tw/twiki/p/data/Sandbox/Fis er godt.txt' file lying around now...)

OK so it is discouraged to use non WikiWord-s for topics, but not impossible. And when someone does that we croak on it. I tried a pseudo-patch, putting '' around the filename. But it doesn't do the job properly...

TWiki.cfg has lines like this in it:

    coCmd         => "$rcsDir/co $rcsArg -q -p%REVISION% $keywordMode %FILENAME% $endRcsCmd",

If %FILENAME% contains spaces, that gives the problems... I tried naively replacing %FILENAME% with '%FILENAME%' (or rather $cmdQuote%FILENAME%$cmdQuote) but that messes up because

    ciDateCmd     => "$rcsDir/ci -l $rcsArg -q -mnone -t-none -d$cmdQuote%DATE%$cmdQuote -w$cmdQuote%USERNAME%$cmdQuote %FILENAME% $endRcsCmd",

and in RcsWrap.pm we find this code:

    $cmd =~ s/%FILENAME%/$file $rcsFile/;

So it is a bit of a messy thing, this "Topic contains spaces" thingy. I can see the next step, putting in $cmdQuote there too, but I can also see this snowballing. For now, I'll just avoid spaces in the topic name. But if a user forcably creates such a topic, it is left dangling in a half-created state....

Maybe an easier solution is to properly refuse to create such topics. I don't know. My experience with the code is very limited.

Peter

  • TWiki version: 01 Feb 2003
  • Perl version: 5.6
  • Web server & version: Apache 1.3
  • Server OS: SuSE Linux 7.2
  • Web browser & version: IE 6.0
  • Client OS: WinXP?

-- PeterMorch - 12 May 2003

Answer

This is a bug, needs to be fixed. Added Codev.TopicSaveErrorWithTopicsContainingSpace bug report. Please report bugs in Codev.BugReport

-- PeterThoeny - 12 May 2003

Topic revision: r2 - 12 May 2003 - 16:04:33 - PeterThoeny
 
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