Loading...
 
Skip to main content

Features / Usability


Disabling the warning "Are you sure you want to navigate away from this page?"

So now that our wiki is upgraded to 1.9.9, I noticed something annoying. When editing a page, clicking preview or save triggers an Internet Explorer popup which warns that if you navigate away from this page your changes will be lost.

I am guessing this is a (relatively) recent addition to the tikiwiki software to prevent losing edits by linking away: http://doc.tikiwiki.org/tiki-index.php?page=Lost+edit+by+linking+away&blQuestion

But... it seems really confusing to a novice user (as most of the folks using my wiki are) to be trying to save changes and get a warning telling them that if they continue they will lose their changes.

Is there a way to disable this warning in preferences somewhere? I would rather take the risk of someone losing an occasional edit than guaranteed confusing with every new edit.

If a current solution doesn't exist, then I guess I should add it to the wishlist in dev.tikiwiki.org? Haven't done that before, but I'm willing to give it a go if need be...

thanks in advance!

-Mark

Hm... it should only be displaying the warning if you click away from the page — the Save and Preview buttons should not be causing the warning. Are you using a custom set of templates?

You can turn off the "lost edit protection" by disabling the needToConfirm script (I believe in the header.tpl).

HTH,

-RickQuestion
Need more help? Try TikiWiki for Dummies SmartiesQuestion — A beginner's guide to using ))TikiWiki((.


I noticed that some themes like neat.css don't have the same behavior. (they use custom .tpl files)

M 😉


You guys are great, thanks!

Turns out I am using neat.css. In my noobness, I wouldn't have thought that was anything "custom", but I guess it is. I switched to moreneat.css which is a similar layout with different colors and it is now working as intended.

So is this a bug in the custom .tpl files or something?

-Mark

Yes, it's a bug. Neat has its own tiki-editpage.tpl file, which wasn't updated with the javascript that the lose-edits warning uses.

I think the main reason the theme has its own file is to move its row of edit/remove/etc. links from edit page bottom to page top. If this isn't important to you, and you'd like to use the Neat theme, you can try renaming templates/styles/neat/tiki-editpage.tpl (any new name will do, even just appending a some characters or something, just so it no longer has its original name). The theme will then use the default editpage template and should no longer produce those popups. (Alternatively, you could find the warning javascript lines in the standard file and copy them into Neat's file, but this is a little more work.)

-- Gary

>
>Turns out I am using neat.css. In my noobness, I wouldn't have thought that was anything "custom", but I guess it is. I switched to
>
>

"Custom" in the sense that it uses templates that are not in the default ../templates/*.tpl.

But yes, it looks like there are other tiki-editpage.tpl files that need to be updated (at least for 1.9.x). I think that for 1.10, the entire idea of which templates to deliver is being re-thoughtQuestion.

HTH,

-RickQuestion
Need more help? Try TikiWiki for Dummies SmartiesQuestion — A beginner's guide to using ))TikiWiki((.