[pmwiki-users] Should $EnableNotSavedWarning be enabled by default?
5ko at 5ko.fr
Wed Jan 5 05:15:06 PST 2022
On 04/01/2022 21:38, Simon wrote:
> I couldn't agree more.
> As there is no easy undo if you close without saving, and the
> are severe - the loss of potentially a lot of work.
> Also I think modern expectation (cf online editing such as google docs)
> that you can't/shouldn't be able to accidentally lose input.
I was worried what if I write and write, then preview, and decide not to
save my edits. But as PmWiki stores all page history, in case of a
mistake I can restore an older version.
There is a recipe AutoSave:
However, it is somewhat complex, I don't use it, and I am not
comfortable with adding the full recipe to the core.
For example, it requires for Drafts to be enabled. Also, if someone else
is editing the same page, it may fail to resolve the differences.
We also have SessionPageStore:
Something like this could be adapted to only temporarily store unsaved
texts. It is specific to the user, another user would have a separate
But the future is probably the modern browsers' LocalStorage interface,
where we could store the page text until it is submitted and saved.
Which would also allow offline editing (but not previewing and saving
> On Wed, 5 Jan 2022 at 00:23, Petko Yotov <5ko at 5ko.fr> wrote:
>> Currently by default PmWiki doesn't warn when people edit a page, and
>> try to move away from the edit form without saving.
>> We have $EnableNotSavedWarning but it needs to be enabled in
>> by the administrator.
>> I added it to sample-config.php, but I wonder if instead we should
>> simply enable it by default.
>> I believe the setting dramatically improves the user experience and
>> saves a lot of frustration, especially with inexperienced editors and
>> administrators (who have yet to read the documentation and enable the
>> The setting, enabled, might possibly interfere with some custom edit
>> forms, although I am not aware of such a case, or with some of the
>> existing recipes that do exactly this.
>> If we enable it by default, anyone who doesn't need this feature can
>> disable it with
>> $EnableNotSavedWarning = 0;
>> Even if there might be existing administrators who may be annoyed to
>> this line when they upgrade, I feel the benefit from having the
>> enabled outweighs the downside.
More information about the pmwiki-users