savemulti is an addon script from KoalaSkin which merges the functionality of the stock save and preview cgi scripts. Savemulti has been in use on many systems for a long time, years, with no significant problems reported. This topic is about what needs to be done to replace the stock SaveCgiScript with savemulti.
savemulti is just like save, with another optional parameter in the URL: action
which can take the values (set by the forms in the edit template): Checkpoint save & continue editing
QuietSave save but don't trigger email notification
Cancel cancel edit, release lock
Preview go to preview view.
action, doing in this case slight variations of what is done in save
savemulti would be renamed to save and replace save and preview.
Here are my (MattWilkie's) results of testing repRev and delRev in conjunction with savemulti. Please see the description inDoes this still need more testing before it can be accepted as core? Peter said "does it work with forms, does it work with repRev, delRev, etc?" and Matt has answered repRev and delRev. Nobody has mentioned specificaly that forms are ok, what else is there that needs testing? Are there any remaining objections to its incorporation into the core?TWiki.cfgfor what repRev and delRev are. I did not test from a username which is not part of the TWikiAdminGrouprepRev
saveandquietsaveare successful.checkpointworks the first time - it saves the edit - but when the page reloads you are taken out of repRev mode so any subsequent actions are logged.previewworks, however like checkpoint subsequent action, e.g.savefrom thepreviewscreen increments the revision number (and author).delRev
saveandquietsaveare successful, the last revision is deleted.checkpointworks, but like repRev you are kicked out of delRev mode (which is probably a good idea anyway. How often are you going to want to delete multiple revisions like this?)previewgave me the "Access Denied. Only members of the TWikiAdminGroup are allowed to perform this action." message. I am a member of the admin group however.Server Apache/1.3.27 (Unix) Debian GNU/Linux mod_auth_pam/1.1.1 mod_perl/1.27Client Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030507Perl 5.8.0twiki Alpha 13 May 2003skin SeeSkin (actually SeeSkinToo, from cvs)savemulti # CN 28 Feb 2002 (I think, I did not see an explicit version number)None of the problems discovered with the *Rev commands would affect people using the classic twiki skin because the extra functions are not exposed. Thus they are not a reason to not include savemulti in the core (but they should still be fixed). -- MattWilkie
ctrl ,for example, and it stays depressed until after the next keypress.) However I've noticed that using it plays havoc with the WebStatistics. On my work twiki I'm currently credited with 43 topic actions on a page I only created three days ago! : -) -- MattWilkie 19 Sep 2002
I used savemulti for a while w/o problems, really love it. I strongly second the wish to make savemulti the default. You want that extra preview cycle only in rare cases. And the checkpoint is really worth it! -- PeterKlausner - 26,28 Aug 2002
Never encountered a problem with savemulti;
using it for 11 months and ~10 different forms.
Haven't tried the hidden admin options,
I always resort to the shell for that stuff wink
BTW: given the choice, my users ran just 276 previews compared to 12000 direct saves!
-- PeterKlausner - 14 Jul 2003
I've used it at http://www.redbourn.org.uk/ for well over 18 months. My users don't have access to the shell and they have never asked me to fix a problem. -- MartinCleaver 15 jul 2003
I have been using savemulti for nine months and haven't had a single problem with it. I use it with forms. -- MattWilkie 15 Jul 2003
Of course savemulti is used here extensively at ILOG without problems by my users. On the repRev and delRev, I must confess that I never use them, as I never seem to remember their existence when I need them. And when I remember, I hesitate to use them because I do not know if they still work. Actually, I tried once to use delRev but it did not work because the last revision also changes attachements... (something that do not work as intended by the user
with the original save script of course). [...] If delRev
is important, make it a supported feature first, with a defined behavior (especially wrt attachements), but do not delay the savemulti feature...
-- ColasNahaboo - 07 Aug 2003
JoelOnSoftware writes in
Building Communities with Software:
- Q:
- Why don't you show people their posts to confirm them before you post them? Then people wouldn't make mistakes and typos.
- A.
- Empirically, that is not true. Not only is it not true, it's the opposite of true.
Part one: when you have a confirmation step, most people just click past it. Very few people reread their post carefully. If they wanted to reread their post carefully, they could have done it while they were editing it, but they are bored by their post already, it's yesterday's newspaper, they are ready to move on.
Part two: the lack of the confirmation step actually makes people more cautious. It's like those studies they did that showed that it's safer, on twisty mountain roads, to remove the crash barrier, because it makes people scared and so they drive more carefully, and any way, that little flimsy aluminum crash barrier ain't gonna stop a 2 ton SUV moving at 50 mph from flying off the cliff. You're better off, statistically, just scaring the bejesus out of drivers so they creep along at 2 miles per hour around the hairpins.
input value parameter should return an error condition. The lack of this caused me to chase my tail for several days trying to figure out why my form was not working as expected. This "lack" does not cause problems for day to day use, only for troubleshooting skin development.
save is just as wrong.
There is also the very important question of whether repRev and delRev should ever be used. That however is a debate for another day and another topic.
On the repRev and delRev, I (CN) must confess that I never use them, as I never seem to remember their existence when I need them. And when I remember, I hesitate to use them because I do not know if they still work. Actually, I tried once to use delRev but it did not work because the last revision also changes attachements... (something that do not work as intended by the user with the original save script of course).
savemulti is intended to replace save and preview so it saves one script. As for the diff, well, it will just replace save by savemulti, but note that the templates will have to be modified accordingly.
ColasNahaboo incorporated the new save and preview scripts into it. Please review the template patches. There is an help text at the end that you may want to edit. mod_perl, savemulti can leave the lock if one previews before saving. Apply the additional patch save-multi.2.diffs to save multi after save-multi.diff
bugfix (found by Esteban Manchado): you need to edit the 2 lines (near lines 135 & 210) containing the string:
$theParent = "" if( $theParent eq "%TOPICPARENT%" ); # means keep sameto add a backslash character:
$theParent = "" if( $theParent eq "%\TOPICPARENT%" ); # means keep sameOtherwise it could mess saving topics without parents Some of the issues you might encounter: Savemulti seems to forget the loginname when saving, so changes belong to
TWikiGuest. TOPICINFO says guest, the lock file says MyName on first edit, but guest after first save, if you re-edit, the topic is "locked by another user", save instead of savemulti in the edit.tmpl works correctly!?
You probably have forgotten to declare savemulti as requiring valid user in .htaccess just as for save
.changes file. We need them there because of a program we wrote (the "lurker", a mixture of page diff and WebChanges), and when someone uses Checkpoint, the changes don't appear in there. I suppose the patch is simply remove the $dontNotify = "checked";, but I don't know why is it there in the first place. Comments?
-- EstebanManchado - 30 Jul 2003
For me it is because Checkpoint is a "save and continue editing" mode. Which means don't tell everybody yet because I'm not finished. When I'm done I'll slap Save to let everybody know.
-- MattWilkie - 30 Jul 2003
Yes, this was the intended reason. The use case of checkpointing is really work in progress, to save intermediate state in case of browser crash, and to provide some sort of undo mecanism (reverting to last checkpoint) I do not think one want to notify on the checkpoints.
-- ColasNahaboo - 31 Jul 2003
The rationale sounds all fine.
But at least with the AthensRelease, it doesn't work like this:
.changes file,
not just slapping a line to the eof.
savemulti, when all I really wanted was to be be able to replace the Preview button with a Save button. In any skin. The answer is: edit edit.tmpl, any variant, and replace 'preview' with 'save'. There are two occurences, the first is the script path (bin/preview) and the second is the label of the button (Preview Changes). And that's it. really. sheesh.
edit.my-skin.tmpl replace preview with save :
<form name="main" action="%SCRIPTURLPATH%/save%SCRIPTSUFFIX%/%INTURLENCODE{"%WEB%/%TOPIC%"}%" method="post">
2) and change topicaction from this:
%TMPL:DEF{"topicaction"}% <input type="submit" value=" Save Changes " />
%TMPL:P{"sep"}% <a href="%SCRIPTURLPATH%/view%SCRIPTSUFFIX%/%WEB%/%TOPIC%?unlock=on">Cancel</a> edit %TMPL:END%
to this:
%TMPL:DEF{"topicaction"}%
<fieldset><legend><span class="deem"> [[%TWIKIWEB%.AccessKeys][AccessKeys]]: S = Save, Q = Quiet Save, K = Checkpoint, P = Preview, C = Cancel</span></legend>
<label accesskey="s" for="save">
<input type="submit" name="action" value="Save" />
</label>
<label accesskey="q" for="quietsave">
<input type="submit" name="action" value="QuietSave" />
</label>
<label accesskey="k" for="checkpoint">
<input type="submit" name="action" value="Checkpoint" />
</label>
<label accesskey="p" for="preview">
<input type="submit" name="action" value="Preview" />
</label>
<label accesskey="c" for="cancel">
<input type="submit" name="action" value="Cancel" />
</label>
</fieldset>%TMPL:END%
Note: the above example uses AccessKeys which might not be appropriate for all sites. If you don't want to use them, use something like this instead (this is used on the default twiki skin):
%TMPL:DEF{"topicaction"}%
<input type="submit" name="action" value="Save" />
<input type="submit" name="action" value="QuietSave" />
<input type="submit" name="action" value="Checkpoint" />
<input type="submit" name="action" value="Preview" />
<input type="submit" name="action" value="Cancel" />
%TMPL:END%
3) and update the help ('TWiki06x01.WikiSyntaxSummary'):
* *Save:* Save topic and return to normal view * *QuietSave:* Save but will not trigger email notification to people monitoring the page (checks the "Minor changes" checkbox) * *Checkpoint:* Save, and re-edit immediately * *Preview:* Do not save yet, but show what the topic would look if saved * Cancel:* Discard changes and return to view mode, release lock * *Do not use BACK in your browser to cancel* instead, or the topic will stay locked, preventing other people to edit it for one hour-- MattWilkie - 23 Jul 2004 Removed CSS id tags and SeeSkin specific reference. Added sans-AccessKeys example. Added text from Sven which I inadvertantly deleted yesterday. -- MattWilkie - 24 Jul 2004
| WebForm | |
|---|---|
| TopicClassification | PatchAccepted |
| TopicSummary | Change topic with direct save (without edit/preview/save cycle) and checkpoint save |
| InterestedParties | WillNorris |
| AssignedTo | MattWilkie |
| AssignedToCore | SvenDowideit |
| ScheduledFor | CairoRelease |
| RelatedTopics | CategoryEditingWorkflow |
| SpecProgress | 100% |
| ImplProgress | 100% |
| DocProgress | 95% |
| I | Attachment | History | Action | Size | Date | Who | Comment |
|---|---|---|---|---|---|---|---|
| Unknown file formatdiff | edit.tmpl.diff | r1 | manage | 2.5 K | 2002年08月29日 - 09:17 | UnknownUser | diffs against TWiki20020803beta |
| Unknown file formatdiff | preview.tmpl.diff | r1 | manage | 2.0 K | 2002年08月29日 - 09:18 | UnknownUser | diffs against TWiki20020803beta |
| Unknown file formatdiffs | save-multi.2.diffs | r1 | manage | 0.7 K | 2002年09月12日 - 13:26 | UnknownUser | additional patch to apply after save-multi.diff |
| Unknown file formatdiffs | save-multi.diffs | r1 | manage | 6.9 K | 2002年08月29日 - 09:01 | UnknownUser | diffs against save of TWiki20020803beta |
| Unknown file formatext | savemulti | r2 r1 | manage | 10.0 K | 2004年07月05日 - 11:46 | UnknownUser | updated to work with twiki beta 2004 May 07 |
| Unknown file formatdiff | savemulti-preview-enhancements.diff | r1 | manage | 0.5 K | 2003年09月30日 - 08:38 | UnknownUser | in preview mode, links open in a new window |