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

Item6012: POST data lost without previous login (query cache mechanism not 100%)

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine TWiki::UI Urgent Closed   major  

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


Using a fresh twiki svn checkout (I didn't test yet with TWikiRelease04x02):

  • Go to Sandbox.WebHome and change method definition of the form used to create new topics given a name: (original form doesn't have method attr, so it defaults to get)
<form method="post" action='%SCRIPTURLPATH{"search"}%/%WEB%/'>
  • Logout
  • Try to create a topic named 'TestTopic', for example
  • TWiki should ask you to login (I tested this issue with TemplateLogin)
  • You'll WYSIWYG editing Sandbox.WebHome, instead of TestTopic

It happens because it's necessary to be logged in to create a topic, so original POSTed data is cached and TWiki redirects you to login with twiki_redirect_cache URLPARAM adjusted, so original data can be loaded (and if you look at hidden field, all original POSTed data is there, including twiki_redirtect_cache). Then you POST login info and TemplateLogin, after validation, redirects you to origurl asking for a cache (TWiki::LoginManager::TemplateLogin::login() calls TWiki->redirect($origurl, 1)). TWiki::redirect calls TWiki::cacheQuery and this one returns empty string, since we already have a twiki_redirect_cache. Here comes the problem: the current twiki_redirect_cahce was defined at the first POST (the one that resulted on login screen) and was used (and erased! TWiki::UI unlinks cache file after read) and orignal data is lost.

The solution is quite simple: TWiki::UI should delete twiki_redirect_cache parameter after unlink (at this stage, it's not valid anymore). This way, if another cache is needed, then a new file is created and things works well.

-- TWiki:Main/GilmarSantosJr - 22 Sep 2008

I've just tested TWkiRelease04x02: it's ok. No changes needed.

-- TWiki:Main.GilmarSantosJr - 22 Sep 2008

Summary POST data lost without previous login (query cache mechanism not 100%)
ReportedBy TWiki:Main.GilmarSantosJr
Codebase ~twiki4
SVN Range TWiki-5.0.0, Fri, 12 Sep 2008, build 17509
AppliesTo Engine
Component TWiki::UI
Priority Urgent
CurrentState Closed

Checkins TWikirev:17536
TargetRelease major

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r4 - 2010-05-31 - PeterThoeny
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