• 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.

see TWiki:Codev.CreateCancelFail

currently testing this patch:

Index: UI/Save.pm
--- UI/Save.pm  (revision 6384)
+++ UI/Save.pm  (working copy)
@@ -397,8 +397,20 @@
         if( $lease && $lease->{user}->equals( $user )) {
             $store->clearLease( $webName, $topic );
-        my $viewURL = $session->getScriptUrl( $webName, $topic, 'view' );
+       # redirect to a sensible place (a topic that exists)
+       my $viewURL;
+       # check that the page already exist before redirecting to it
+       if ( $store->topicExists( $webName, $topic ) ) {
+           $viewURL = $session->getScriptUrl( $webName, $topic, 'view' ) . '?unlock=on';
+       } elsif ( $query->param( 'topicparent' ) &&
+                $store->topicExists( $webName, $query->param('topicparent') ) ) { # go to parent
+           $viewURL = $session->getScriptUrl( $webName, $query->param( 'topicparent' ), 'view' );
+       } else { # last resort: web home
+           $viewURL = $session->getScriptUrl( $webName, $TWiki::cfg{HomeTopicName}, 'view' );
+       }
         $session->redirect( $viewURL );

     } elsif( $saveaction =~ /^(del|rep)Rev$/ ) {

SVN:6389, but i still have questions about how topicparent could have ever worked... at least code is better than what was there before, whereby you could be redirected to a topic that doesn't exist. -- WN

after a discussion with colas on TWiki:Codev.TWikiIRC, we determined that that topicparent case doesn't work because the Cancel "button" isn't a submit button (which would send all of the form data), but instead a simple link. so, Cancel needs to be converted into a proper button. -- WN

ok, this code is fine; however, Cancel buttons need to be made into proper buttons. see Item395 -- WN

Summary Cancelling a page creation fails in a confusing way
ReportedBy WillNorris

AppliesTo Engine
Priority Normal
CurrentState Closed

Checkins 6389
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2005-09-16 - WillNorris
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback