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

Item3960: %ORIGURL% not parse from TemplateLogin.pm

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension NatSkin Normal Closed   n/a  

Edit Form Data

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


%ORIGURL% doesn't parse when you need to re-login to change a topic

1) Login as a normal user (less priviledge user)

2) Click on edit to modify a topic that requires necessary credentials

3) Access Denied page is shown e.g.


4) HTML source on line 137,

136: </table>
137: <input type="hidden" name="origurl" value="%ORIGURL%" />
138: </form>

5) Nice error message called 400 BAD REQUEST

URL: http://localhost/bin/login/TWiki/%ORIGURL%?twiki_redirect_cache=8cfb2349431a8c6ea48a983a144c562f

6) But going to http://localhost/bin/view/TWiki works perfectly fine, i.e. logged in as the actual user.

Redirect from normal login works fine. smile

-- TWiki:Main/KwangErnLiew - 26 Apr 2007

I don't understand steps 5 or 6. Can you describe exactly what you were trying to do, and exactly what steps you used to do it? Thx.


sorry for not being clear. was tired. :/

step 5 basically shows what the error message is when i input the correct username and password in step 3. step 4 is just additional information on the html source of step 3.

step 6 indicates that the user is actually logged in, but is not 'confirmed' or redirected to because of step 5. so basically, the user is actually logged in, and going to a page will show that the user is logged in, but the redirection didn't work from step 3 onwards.

hope that's clear...

-- TWiki:Main.KwangErnLiew - 27 Apr 2007

OK, did some more digging.

This issue only occurs for NatSkin. The interface doesn't exist on PatternSkin.

Can't figure out what went wrong in TemplateLogin.pm. Not elite enough and gave up. frown

-- TWiki:Main.KwangErnLiew - 27 Apr 2007

OK, it's a template issue. 4 templates are affected, login.classic.tmpl, login.pattern.tmpl, login.tmpl, and loginbase.nat.tmpl (NatSkin)

basically %ORIGURL% should be %=URLPARAM{"origurl"}=%

patch is attached. smile

-- TWiki:Main.KwangErnLiew - 27 Apr 2007

Actually, TemplateLogin.pm happily replaces ORIGURL with the correct value for me. Infact, URLPARAM{"origurl"} does not work for me even if there is an url param "origurl". Strange.

What is the value of your LoginManage for TWiki? Is it set to TemplateLogin or to none? You should only be able to get the above oops url when you set it to none. That's an ancient NatSkin interface of its own login manager from pre-dakar times. Please set the LoginManager to TemplateLogin and try again, please. If I do so I don't get that oops url. I get a http://..../login/Web/Topic?origurl url.

-- TWiki:Main.MichaelDaum - 22 May 2007

Okay, I can confirm this bug. The oops ui does not expand ORIGURL, nor is there an origurl urlparam. So the correct fix is to wrap ORIGURL into an IFDEFINED like this

input type="hidden" name="origurl" value="%IFDEFINED{"%ORIGURL%"}%" /
so that it is removed when it is not defined.

-- TWiki:Main.MichaelDaum - 23 May 2007

Hm, strange...

TemplateLogin is the LoginManager for me.

I've just tried out IFDEFINED and it works the same as what you have.

Am using NatSkin 3.0-pre13 and NatSkinPlugin 3.0-pre12 btw.

-- TWiki:Main.KwangErnLiew - 25 May 2007

Fixed in Item4689 and released as NatSkin-3.0-pre15

-- TWiki:Main.MichaelDaum - 21 Sep 2007

Summary %ORIGURL% not parse from TemplateLogin.pm
ReportedBy TWiki:Main.KwangErnLiew

SVN Range TWiki-4.1.2, Sun, 15 Apr 2007, build 13419
AppliesTo Extension
Component NatSkin
Priority Normal
CurrentState Closed


TargetRelease n/a

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatpatch origurl.patch r1 manage 2.1 K 2007-04-27 - 10:36 UnknownUser ORIGURL patch
Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r9 - 2007-09-21 - MichaelDaum
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