WordPress.org

Ready to get started?Download WordPress

Forums

WordPress 2.5.1 Autosave Problems? Inelegant Fix (2 posts)

  1. ImJustCreative
    Member
    Posted 6 years ago #

    Inelegant Fix Here for Autosave duration.
    After seeing many posts and replies on this issue here, including several by myself:
    http://wordpress.org/support/topic/172302/page/2?replies=34

    I have posted the following article at the end of that post, but thought it wise to create a new post so people can easily find it while searching the forums.

    Not being a coder, I decided to take a crack myself. I think I have found a make do hack, until it can be solved properly.

    Edit your 'autosave.js' file which can be found in 'WP-includes'>'JS'>'autosave.js'

    There are some values on line 5-7:

    jQuery(function($) {
    	autosaveLast = $('#post #title').val()+$('#post #content').val();
    	autosavePeriodical = $.schedule({time: autosaveL10n.autosaveInterval * 1000, func: function() { autosave(); }, repeat: true, protect: true});

    So I changed this:

    {time: autosaveL10n.autosaveInterval * 1000, func: function() { autosave(); }

    to something like this:

    {time: autosaveL10000n.autosaveInterval * 1000000, func: function() { autosave(); }

    All i did was take a guess and increase these values to some silly high number.

    NOt sure if this will have any other unwanted sideaffects, guess time will tell or someone can tell me.

    So far, after creating a post and manually saving it, the autosave has not kicked in. This giving me time to actually write a post etc.

    Im not too sure what these values equate to in time wise, milliseconds etc, but it appears to work.

    You could try removing the complete 'autosave.js' file and see what happens, I may try that later. Just back it up.

    Hope that helps for the time being.

    [sig moderated]

  2. mr. Lot
    Member
    Posted 6 years ago #

    I just followed your last suggestion and removed the autosave.js file.
    All seems to be working fine. Wrote a post, saved, posted etc. What a relief to be able to use WP again! Tnx for your suggestions.

Topic Closed

This topic has been closed to new replies.

About this Topic