• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

TWiki::UI::Save::buildNewTopic needs the same fix that was applied to TWiki::UI::Edit::edit (see Item1939)

With this fix applied, further problems come to light. As pointed out by the comments in the code, if a non-wikiname is specified (and onlywikiname is true), UI::Save::buildNewTopic should throw an exception; instead it generates a redirect and returns 0. But, UI::Save::save, which calls buildNewTopic expects an exception on error, so doesn't notice that the return isn't what it expects, and blithely goes ahead and saves the topic. Ooops.


Well, the above analysis is correct, but the behavior exists regardless of applying the suggested fix.

I've attached a patch which

  • makes save recognize the nonwikiword parameter correctly
  • makes save and edit throw an Oops if a non-wikiword is disallowed but one is passed
  • supplies an appropriate template message for the Oops

It does not implement the tests alluded to in messages.tmpl as I'm not familiar with them.


Diab, many thanks for the patch, which I used to guide me through applying changes.

As for not updating testcases "because you are not familiar with them", wash your mouth out with soap. Testcases are the lifeblood of any complex software project. If you want to raise quality, and I am sure you do, you will not ignore testcases, you will do everything in your power to make sure they are updated and run! Grrr.


Oh, I have no objection to writing tests; I seem to spend most of my time creating and populating test frameworks for my own software. It's even fun sometimes.

I meant that I'm not familiar with the test framework that TWiki uses. I don't have the time right now to figure it out, so take my admission more as an apology and explanation for my not doing the job properly rather than as a rejection of the testing philosophy.

(As an aside, if you've ever seen the movie "A Christmas Story", you'd never threaten anyone with washing their mouth out with soap. It's a bit of a cult classic in the USA; don't know if it's available elsewhere.)


Summary TWiki::UI::Save::buildNewTopic does not treat onlywikiname as a Boolean
ReportedBy TWiki:Main.DiabJerius
Codebase 4.0.2
SVN Range Sat, 06 May 2006 build 10108
AppliesTo Engine

Priority Normal
CurrentState Closed

Checkins 10419 10431
TargetRelease patch
Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatpatch nonwikiname.patch r1 manage 4.2 K 2006-05-11 - 18:26 UnknownUser Fix save nonwikiname behavior, add nonwikiname oops to save and edit
Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r8 - 2006-06-02 - DiabJerius
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback