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

Feature Proposal: Allow Blank Topics

TWiki doesn't allowing saving blank topics. this as an unnecessary restriction (especially when considering TWiki in the context as a backend---it's like a file system that doesn't allow you to create a file of length 0!)


  • creating topics consisting solely of attachments
  • bots won't have to deal with an "empty topic" special case
    • (and may act depending on the presence or absence of a topic)

Impact and Available Solutions




Action Cairo Dakar
http://twiki.org/cgi-bin/edit/Codev/BlankTopic?text= text has no effect ???
http://twiki.org/cgi-bin/edit/Codev/BlankTopic?text=not%20blank text has no effect ???


Action Cairo Dakar
http://twiki.org/cgi-bin/preview/Codev/AllowBlankTopics oopsempty oopsempty *
http://twiki.org/cgi-bin/preview/Codev/BlankTopic oopsempty oopsempty *
http://twiki.org/cgi-bin/preview/Codev/BlankTopic?text= oopsempty preview + save
http://twiki.org/cgi-bin/preview/Codev/BlankTopic?text=not%20blank oopsempty preview + save

* oopsempty + show view page?


Action Cairo Dakar
http://twiki.org/cgi-bin/save/Codev/AllowBlankTopics oopssave oopssave *
http://twiki.org/cgi-bin/save/Codev/BlankTopic oopssave oopssave *
http://twiki.org/cgi-bin/save/Codev/BlankTopic?text= oopssave save
http://twiki.org/cgi-bin/save/Codev/BlankTopic?text=not%20blank oopssave save

* offer link to (or show?) view page?


checked into DEVELOP r3586

-- WillNorris - 01 Feb 2005


This is actually a necessary feature we put in to prevent a topic from being overwritten by accident, e.g. if a user sends a URL by e-mail with /view/ replaced by /preview/ or /save/. It actually happens once in a while that someone sends the preview url by email. Before the fix, an innocent person clicking on the link got a blank preview page; hitting save would wipe out the existing content.

-- PeterThoeny - 02 Feb 2005

Would that still be the case with ReleaseLocksOnSave? The way I understand it with no editrev parameter it should be redirected to a preview showing that they are about to delete the topic content.

-- SamHasler - 02 Feb 2005

Good point, if the topic text can't be removed by accident I see no issue in allowing zero length topics.

-- PeterThoeny - 03 Feb 2005

I just noticed that I have preview and save urls in my address bar history. It wouldn't be too hard to accidentally visit one of these. Entering a preview url took me to oopsempty with the message "Topic must not be empty" and save gave me the oopssave page with the "Inproper use of the save script" message. Try it for yourself:

-- SamHasler - 03 Feb 2005

Will: could you investigate if it is safe to remove the zero length check?

-- PeterThoeny - 04 Feb 2005

yes, absolutely Peter. i'm creating the TestCases.

-- WillNorris - 04 Feb 2005

do the API interface and testcases above seem reasonable? are there other issues to consider regarding the lack of an editrev parameter? i'm also interested in enhancements to the oopsempty and oopssave topics, although those improvements are secondary to the API update.

-- WillNorris - 05 Feb 2005

DEVELOP r3597 implements the interface described above

-- WillNorris - 06 Feb 2005

i may have broken the form button while working on this; investigating...

-- WillNorris - 08 Feb 2005

nope, it wasn't related, although i did fix the form button in DEVELOP r3601

-- WillNorris - 08 Feb 2005

DocsToDo - remove docs of existing restriction (text param)

I removed the restriction, r3789. Note that the description of the use model above is incorrect. A save of a blank topic will proceed, and if the save is being done by the same user within the repRev period, it will replace the text in the topic. Personally I think the best solution to this is to eliminate the risk, by disabling repRev by default.

No, I take that back; I just had a brainwave. If we always forcenewrevision before saving a blank topic, we avoid the risk completely. So that's what 've done. r3790.

-- CrawfordCurrie - 11 Mar 2005

Edit | Attach | Watch | Print version | History: r14 < r13 < r12 < r11 < r10 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r14 - 2008-08-28 - TWikiJanitor
  • 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-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.