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

When submitting a comment before being logged in, we now get this error:

Incorrect parameters to the save script

But the save action actually is performed.

It looks like TWiki::UI::Save->buildNewTopic is expecting a save parameter when that parameter is eaten in the login script (that uses twiki_redirect_cache).

Removing the check:

    unless( scalar($query->param()) ) {
        # insufficient parameters to save
        throw TWiki::OopsException( 'attention',
                                    def => 'bad_script_parameters',
                                    web => $session->{webName},
                                    topic => $session->{topicName},
                                    params => [ $script ]);
    }
makes this error go away.

But then the origurl parameter of CommentPlugin is also no longer working, so that parameter is lost as well.

Test: SaveCommentBeforeLoginTest. Log out (how?) then add a comment.

-- AC

This was cause by checkin 11966 "implemented origurl param to the save script". The origurl parameter is used by the login script to determine where to redirect to after the login is complete. The new code now grabs that same value of origurl and tries to redirect to it again.

I think there are two possible solutions; remove the origurl param from the redirect after the login completes, or change the name of the param used to redirect after a save. I will implement the former.

CC

Does not work yet as advertised: if I am logged out, and save a topic using redirecturl, I am not redirected to that topic.

Or need things to be changed to the login page?

I have used the just updated CommentPlugin (in svn) with template return at the bottom of the examples page. Logged in: I am returned to the examples page. Not logged in: I am lead to the login page, and after logging in I go to the comments topic in Sandbox.

AC

Partly solved with Item3309. Now I get redirected properly, but nothing gets saved!

AC

Someone had taken the %ORIGURL% out of the login template. Dont forget to enable redirect in configure.

CC

Still not possible to create a new topic when I am not logged in. When I am logged in no problem. Some save parameters must be lost.

AC

Create New Topic goes to an edit, not a save (at least it does for me) and AFIACT it works perfectly. Can you please be more specific as to what you are trying to do, and what happens?

CC

I will explain my case again. See CommentPluginExamples#return.

  1. Log out.
  2. Enter some text in the comment box.
  3. You will be forced to login
  4. You will be lead to the comments topic in Sandbox, but with no text added

Now you are logged in, try again in CommentPluginExamples#return.

  1. Enter some text in the comment box.
  2. CommentPluginExamples will be reloaded with the added text in the INCLUDEd blockquote

Before the changes to origurl/redirecturl/login I could also save text using the first scenario.

AC

As of SVN 12294 this issue seems resolved. At least things work fine. But natually with $TWiki::cfg{AllowRedirectUrl} = 1; And with

%TMPL:DEF{returnpromptbox}%
<input type="hidden" name="redirectto" value="%SCRIPTURL{view}%/%BASEWEB%/%BASETOPIC%" />
%TMPL:P{promptbox}%
%TMPL:END%

as the comment template

KJL

It still does not work on my site, neither with SCRIPTURL nor with BASEWEB.BASETOPIC, even with AllowRedirectUrl on.

AC

Can you please make sure you have svn updated, and that there are no local modifications blocking it. If you still see a problem, report your exact configuration (server platform, LocalSite.cfg, installed extensions) here. Ta.

CC

Confirmed to work on a fresh installation.

AC

ItemTemplate
Summary Login eats save parameters
ReportedBy TWiki:Main.ArthurClemens
Codebase

SVN Range TWiki-4.1, Tue, 28 Nov 2006, build 12081
AppliesTo Engine
Component

Priority Urgent
CurrentState Closed
WaitingFor

Checkins 12270 12282 12284
TargetRelease minor
Edit | Attach | Watch | Print version | History: r17 < r16 < r15 < r14 < r13 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r17 - 2006-12-19 - ArthurClemens
 
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