SID-02512: The save script can only be called with POST method.
| Status: |
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
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.