Tags:
create new tag
view all tags

SID-02512: The save script can only be called with POST method.

Status: Asked Asked TWiki version: 6.1.0 Perl version: 5
Category: CategoryAuthentication Server OS: Centos 7 Last update: 2 years ago

Hello

Our users report an error when saving a topic

The save script can only be called with POST method. Example:
<form name="new" action="%SCRIPTURLPATH{save}%/Sandbox/" method="post"> ... </form>
If you are developing a TWikiApplication, see TWikiScripts#save for a description of the correct parameters.

This happens from time to time and I cant reproduce the problem

In the logfile I see that a user goes into edit mode but the next script is view and not save. The apache log at this time shows

viewfile: Odd number of elements in hash assignment at  ./lib/CGI/Util.pm line 117

There are similar problems reported in SID-00835 and SID-02368.

Anyone had similar experiences?

Thanks in advance for any feedback

-- Peter Jones - 2023-12-12

Discussion and Answer

Not sure, but this is possibly related to an expired user session? The user edits a topic, user session is OK. Once the user saves the topic, the user is redirected to the authentication provider in case the session expired. After auth, the user is redirected to save via GET instead of POST? You can try to reproduce by deleting your user session before a topic save.

-- Peter Thoeny - 2023-12-13

Hi Peter

Yes you are correct. I opened an edit session on a topic and left it overnight. When I saved the topic this morning, the login session had expired and I was first redirected to the login page. After login I got the error

The save script can only be called with POST method

I was able to go back in the browser to the edit session and save the topic correctly.

In such cases is there a workaround to redirect back to the edit session instead of showing the error?

-- Peter Jones - 2023-12-14

I don't know how to easily redirect to edit, It would also mean to temporarily save the edit topic text before auth redirect, and restore after auth.

A simple workaround is to increase the session, to say, 1 month to 6 month. This is acceptable for a locked down TWiki.

-- Peter Thoeny - 2023-12-15

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Asked
Title The save script can only be called with POST method.
SupportCategory CategoryAuthentication
TWiki version 6.1.0
Server OS Centos 7
Web server apache 2.4
Perl version 5
Browser & version All
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2023-12-15 - PeterThoeny
 
  • 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-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.