"Post in Progress" no longer working Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
3 posters

    "Post in Progress" no longer working

    avatar
    troyeccles
    Forumember


    Posts : 301
    Reputation : 5
    Language : English

    "Post in Progress" no longer working Empty "Post in Progress" no longer working

    Post by troyeccles May 28th 2016, 8:21 am

    Hello.

    @Ange Tuteur provided a javascript for this feature (https://help.forumotion.com/t132804-automatically-save-posts-in-progress) that worked when I first implemented it but I've noticed that it's no longer working. I've re-copied and pasted the code back in but it's still not working. I've tested this on Windows with Chrome, Mac and iPad with Safari and Samsung mobile with Chrome.

    I thought maybe it's an ad-block issue so disabled ad-block but this feature still fails.

    www.bellsareringing.forumotion.com
    phpbb3

    Thanks.

    Code:
    window.localStorage&&$(function(){
    $(function(){
    if($("#text_editor_textarea").length&&typeof $.sceditor!="undefined"){
    var a=$(document.post.mode).val(),
    d=$("#text_editor_textarea").sceditor("instance"),
    e,f,g=function(){
    localStorage.setItem(a,d.val());
    f=0},
    b=JSON.parse(localStorage.getItem("br-data"))||[],c;
    switch(a){
    case"editpost":return;
    case"reply":a+=$(document.post.t).val();
    break;
    case"newtopic":a+=$(document.post.f).val()
    }
    a=parseInt((my_getcookie("fa_"+location.hostname.replace(/\./g,"_")+"_data")||"0").replace(/.*s:6:"userid";(i:([0-9]+)|s:[0-9]+:"([0-9]+)");.*/,"$2$3"))+a;
    -1!=(c=$.inArray(a,b))&&b.splice(c,1);
    if(20<b.length){
    for(c=b.length-1;0<=c;c--)/^\s*$/.test(localStorage.getItem(b[c])||"")&&(localStorage.removeItem(b[c]),
    b.splice(c,1));
    20<b.length&&(localStorage.removeItem(b[0]),
    b.splice(0,1))}b.push(a);
    localStorage.setItem("br-data",JSON.stringify(b));
    $(document.post).submit(function(){
    localStorage.setItem("br-target",a)
    });
    !d.val()&&((e=localStorage.getItem(a))&&d.val(e));
    d.keyUp(function(){
    f||(f=setTimeout(g,3E3))
    })}})});
    window.localStorage&&(localStorage.getItem("br-target")&&function(){
    $("meta[http-equiv='refresh'][content]:first").length&&function(){
    var a=JSON.parse(localStorage.getItem("br-data")),
    b=localStorage.getItem("br-target"),c;
    if(-1!=(c=$.inArray(b,a)))a.splice(c,1),
    localStorage.setItem("br-data",JSON.stringify(a));
    localStorage.removeItem(b)}();
    localStorage.removeItem("br-target")}());
    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19218
    Reputation : 1999
    Language : fluent in dork / mumbojumbo & English haha

    "Post in Progress" no longer working Empty Re: "Post in Progress" no longer working

    Post by Ape May 28th 2016, 5:06 pm

    Hello,

    Have you added any JavaScript before this stopped working ?

    try turning off any new codes you have added and see if it works.



    "Post in Progress" no longer working Left1212"Post in Progress" no longer working Center11"Post in Progress" no longer working Right112
    "Post in Progress" no longer working Ape_b110
    "Post in Progress" no longer working Ape1010
    avatar
    troyeccles
    Forumember


    Posts : 301
    Reputation : 5
    Language : English

    "Post in Progress" no longer working Empty Re: "Post in Progress" no longer working

    Post by troyeccles May 28th 2016, 5:35 pm

    OK I'll try that. Is there a way of turning off java scripts without actually deleting them?
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51556
    Reputation : 3519
    Language : English
    Location : United States

    "Post in Progress" no longer working Empty Re: "Post in Progress" no longer working

    Post by SLGray May 28th 2016, 8:17 pm

    Just turn off JavaScript Management.  There is a yes or no option at the top of the list of JavaScripts.



    "Post in Progress" no longer working Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    avatar
    troyeccles
    Forumember


    Posts : 301
    Reputation : 5
    Language : English

    "Post in Progress" no longer working Empty Re: "Post in Progress" no longer working

    Post by troyeccles May 29th 2016, 12:53 am

    But that turns off the java scripts. Completel . Not helpful to try and find which of the scripts is at fault for stopping the Post in Progress issue.
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51556
    Reputation : 3519
    Language : English
    Location : United States

    "Post in Progress" no longer working Empty Re: "Post in Progress" no longer working

    Post by SLGray May 29th 2016, 2:44 am

    Remove all JavaScripts except for this one. Then check to see if it works. If it does work, then add back the other JavaScripts one by one.



    "Post in Progress" no longer working Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    avatar
    troyeccles
    Forumember


    Posts : 301
    Reputation : 5
    Language : English

    "Post in Progress" no longer working Empty Re: "Post in Progress" no longer working

    Post by troyeccles May 30th 2016, 1:23 am

    Right, I've removed all other javascript and it's still not working.

    I have a separate test forum and that's also failed so I'm guessing there's something in my CSS that's causing this.
    So...how do I work out what?

    Before we go down that path, is there any chance someone can test the "post in progress" script as posted above and see if it still works for them (not that formation have made some global change that's affected it)?
    avatar
    troyeccles
    Forumember


    Posts : 301
    Reputation : 5
    Language : English

    "Post in Progress" no longer working Empty Re: "Post in Progress" no longer working

    Post by troyeccles June 1st 2016, 1:10 am

    Bump