JS stopped 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.
5 posters

    JS stopped working

    LeChat
    LeChat
    Forumember


    Posts : 39
    Reputation : 1
    Language : english, polish

    Solved JS stopped working

    Post by LeChat December 13th 2019, 10:30 pm

    Hello,

    I did a lot of changes today in JS on my forum. After several saves, JS stopped working even in JS files that were working before. There are currently no script changes working. I found a similar problem to mine in this topic: https://help.forumotion.com/t156325-javascript-codes-don-t-work#1078608

    I cleared the cache and history. I did re-synchronization. None of these solutions worked.

    Does anyone know if there is anything else I could do? Or maybe this error will fix itself in few hours/days? Or did I mix it up too much?

    Forum details

    Forum version: #ModernBB
    Position: Administrator
    Browsers: Google Chrome, Internet Explorer, Microsoft Edge
    Forum link: http://teomachia.forumpolish.com/

    Scripts that don't work


    Toolbar avatar
    JS
    Code:
    $(function(){$(function(){$('#fa_welcome').prepend('<span class="toolbar-av">'+_userdata.avatar+'</span>')})});

    Left panel username
    JS
    Code:
    $(function(){
      $(".panel-user").html(_userdata.username);
    });
    HTML
    Code:
    <span class="panel-user"> </span>

    Left panel avatar
    JS
    Code:
    $(function(){
      $(".panel-av").html(_userdata.avatar);
    });
    HTML
    Code:
    <span class="panel-av"> </span>

    Toolbar translation
    JS
    Code:
    $(function() {
      var toolbar_alias = {
     
        Share : 'Udostępnij',
        Login : 'Zaloguj się',
        Register : 'Zarejestruj się',
        Welcome : 'Witaj,',
        Notifications : 'Alerty',
     
        See_my_profile : 'Zobacz profil',
        Edit_profile : 'Edytuj profil',
        All_Topics : 'Moje tematy',
        All_Messages : 'Moje posty',
        js_topics_followed : 'Przeczytane tematy',
        Admin_panel : 'Panel Administracyjny',
        Logout : 'Wyloguj się',
     
        Notif_see_all : 'Zobacz wszystkie alerty',
        Notif_priv_msg : 'Otrzymałeś <a href="/privmsg?folder=inbox&nid=%(nid)s">prywatną wiadomość</a> od <a href="/u%(id)d">%(name)s</a>',
        Notif_report : '<a href="/u%(id)d">%(name)s</a> zgłosił <a href="/report?nid=%(nid)s">wiadomość</a>',
        Notif_friend_req : 'Otrzymałeś <a href="/profile?mode=editprofile&nid=%(nid)s&page_profil=friendsfoes">zaproszenie do przyjaciół</a> od <a href="/u%(id)d">%(name)s</a>',
        Notif_group_req : '<a href="/u%(id)d">%(name)s</a> złożył prośbę o dołączenie do grupy <a href="/g%(group_id)d-%(group_url_name)s?nid=%(nid)s">%(group_name)s</a>',
        Notif_friend_con : '<a href="/u%(id)d">%(name)s</a> zalogował się',
        Notif_wall_msg : '<a href="/u%(id)d">%(name)s</a> napisał wiadomość na <a href="/u%(self)dwall?nid=%(nid)s">twoimp rofilu</a>',
        Notif_abuse : 'Zostało zgłoszone <a href="/admin/index.forum?mode=active&nid=%(nid)s&part=misc&sub=support">nadużyne</a>',
        Notif_topic_watch : '<a href="/u%(id)d">%(name)s</a> napisał/a wiadomość w <a href="/t%(topic_id)d-%(topic_name)s?nid=%(nid)s#%(post_id)d">śledzonym temacie</a>',
        Notif_topic_watch_p : '<a href="/u%(id)d">%(name)s</a> napisał/a wiadomość w <a href="/t%(topic_id)dp%(start)d-%(topic_name)s?nid=%(nid)s#%(post_id)d">śledzonym temacie</a>',
        Notif_topic_watch_guest : 'Gość napisał wiadomość w <a href="/t%(topic_id)d-%(topic_name)s?nid=%(nid)s#%(post_id)d">obserwowanym temacie</a>',
        Notif_topic_watch_p_guest : 'Gość napisał wiadomość w <a href="/t%(topic_id)dp%(start)d-%(topic_name)s?nid=%(nid)s#%(post_id)d">obserwowanym temacie</a>',
        Notif_mention : '<a href="/u%(id)d">%(name)s</a> oznaczył Cię w <a href="/t%(topic_id)dp%(start)d-%(topic_name)s?nid=%(nid)s#%(post_id)d">temacie</a>',
        Notif_hashtag : 'Hasło <a href="/tags/%(tag)s">#%(tag)s</a> zostało oznaczone w <a href="/t%(topic_id)dp%(start)d-%(topic_name)s?nid=%(nid)s#%(post_id)d">temacie</a>.',
     
        All_PMs : 'Brak prywatnych wiadomości',
        No_assigned_rank : 'Brak przydzielonego zadania',
        Posts : 'Posty',
        PMs : 'PW',
        Reputation : 'Reputacja'
     
      },i;
     
      if (window._lang) for (i in toolbar_alias) window._lang[i] = toolbar_alias[i];
    });')})});

    All of these worked before few more changes. Now I deleted everything and saved again without the codes from below, after which JS stopped working:



    Last edited by LeChat on December 15th 2019, 11:48 pm; edited 1 time in total
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    Solved Re: JS stopped working

    Post by TheCrow December 13th 2019, 11:06 pm

    Hello @LeChat,

    First of all, welcome to our support forum!
    As for your question, the changes you made were in all of the above javascripts?
    Also, with the default codes, do these javascripts work or not?
    Lastly, do you have other javascripts that may conflict with these elements in these particular javascripts?

    We are sorry for the trouble,
    Regards,
    TC.



    JS stopped working Thecro10
    Forum of the Forums

    Forumotion Rules | Tips & Tricks |
    FAQ | Did you forget your password?



    *** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
    No support via PM!
    LeChat
    LeChat
    Forumember


    Posts : 39
    Reputation : 1
    Language : english, polish

    Solved Re: JS stopped working

    Post by LeChat December 13th 2019, 11:28 pm

    It's nice to be here. I already find solutions to several issues that I had.
    Back to the topic. Thank you for such a quick response.
    All of these javascripts were installed today. The first four (toolbar avatar, left panel avatar, left panel username and tollbar translation) were worked perfectly. For sure.
    After that I installed another three (chatbox javasripts) and at some point all of javascripts had been crushed.
    I don't have any other javascripts. Futhermore, I deleted all and install again only first four that worked. Now, they don't.
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    Solved Re: JS stopped working

    Post by TheCrow December 13th 2019, 11:34 pm

    And have you cleared your browser cashe after the second installation of the codes or before?



    JS stopped working Thecro10
    Forum of the Forums

    Forumotion Rules | Tips & Tricks |
    FAQ | Did you forget your password?



    *** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
    No support via PM!
    LeChat
    LeChat
    Forumember


    Posts : 39
    Reputation : 1
    Language : english, polish

    Solved Re: JS stopped working

    Post by LeChat December 13th 2019, 11:37 pm

    I don't remember. Probably before and after. I tried few times.
    Should I do it again? In which order?
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: JS stopped working

    Post by SLGray December 14th 2019, 2:07 am

    Are you sure that these JavaScripts will workk on ModernBB?



    JS stopped working Slgray10

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


    Posts : 39
    Reputation : 1
    Language : english, polish

    Solved Re: JS stopped working

    Post by LeChat December 14th 2019, 2:22 am

    Yes, because these javascripts worked about an hour, maybe longer. Currently, no new install scripts works. Not just these.
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    Solved Re: JS stopped working

    Post by TheCrow December 14th 2019, 8:53 am

    Hello again,

    Are you using all these codes in one javascript or in multiple javascripts?



    JS stopped working Thecro10
    Forum of the Forums

    Forumotion Rules | Tips & Tricks |
    FAQ | Did you forget your password?



    *** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
    No support via PM!
    LeChat
    LeChat
    Forumember


    Posts : 39
    Reputation : 1
    Language : english, polish

    Solved Re: JS stopped working

    Post by LeChat December 14th 2019, 3:11 pm

    Multiple javascripts.
    JS stopped working Adnota10

    I've done yesterday many changes, because forum is in building. For now I have free package. Is it possible that some options have been blocked?
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15311
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    Solved Re: JS stopped working

    Post by skouliki December 14th 2019, 3:40 pm

    you might have a conflict between js

    can you try to enable one by one

    LeChat
    LeChat
    Forumember


    Posts : 39
    Reputation : 1
    Language : english, polish

    Solved Re: JS stopped working

    Post by LeChat December 14th 2019, 4:17 pm

    Yeah. I tried. But as I wrote ealier. These javascripts worked all together yesterday.

    About 6pm Toolbar looked like this:
    JS stopped working FGK8D6a

    About 6:30pm left panel avatar and username worked as well. I don't have screen from this hour, but I'm sure these worked. There were generated by forum (admin avatar and username).

    About 7pm javascripts stopped working. After installing some of these scripts. I'm not sure which exactly:


    Now it looks like this:
    JS stopped working Kejl0t9


    And really I don't think it's problem in these specific ones javascripts. It's some bug on my forum, that don't allow me to install any of javascripts.
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15311
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    Solved Re: JS stopped working

    Post by skouliki December 14th 2019, 4:26 pm

    ok so force the default templates to test the js
    if the js all of them are working then the issue is in the templates

    did you add any css codes?

    LeChat
    LeChat
    Forumember


    Posts : 39
    Reputation : 1
    Language : english, polish

    Solved Re: JS stopped working

    Post by LeChat December 14th 2019, 4:30 pm

    Ok, I tried. I forced the default templates (Display > Templates, yes?). It didn't work. Sad

    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15311
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    Solved Re: JS stopped working

    Post by skouliki December 14th 2019, 4:31 pm

    did you add any css codes?

    LeChat
    LeChat
    Forumember


    Posts : 39
    Reputation : 1
    Language : english, polish

    Solved Re: JS stopped working

    Post by LeChat December 14th 2019, 4:34 pm

    Yes, I did, but when the problem started I just changed the width of the forum, the picture in the background of the panel and a few small things (font size etc.).
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15311
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    Solved Re: JS stopped working

    Post by skouliki December 14th 2019, 4:38 pm

    delete those ccs changes to check if the js are ok

    you can also try
    turn JS off and re-synchronize your site then re-enable them , sometimes this trick works, sometimes don't

    another thing i can think of is using the backup option to bring your forum to a previous status


    note...i assume the js are enabled

    LeChat
    LeChat
    Forumember


    Posts : 39
    Reputation : 1
    Language : english, polish

    Solved Re: JS stopped working

    Post by LeChat December 14th 2019, 4:56 pm

    I deleted css. It didn't work.
    Disable JS and re-synchronize site were the first things I did. I tried again. It didn't work, either.
    Thank you. I will try backup option.
    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19325
    Reputation : 2005
    Language : fluent in dork / mumbojumbo & English haha

    Solved Re: JS stopped working

    Post by Ape December 14th 2019, 5:08 pm

    Are you making sure the settings are right on your JavaScript's

    like in all pages, Home page, and so on.

    some times if they are set wrong then this can give problem's



    JS stopped working Left1212JS stopped working Center11JS stopped working Right112
    JS stopped working Ape_b110
    JS stopped working Ape1010
    LeChat
    LeChat
    Forumember


    Posts : 39
    Reputation : 1
    Language : english, polish

    Solved Re: JS stopped working

    Post by LeChat December 14th 2019, 5:20 pm

    skouliki wrote:another thing i can think of is using the backup option to bring your forum to a previous status
    Backup didn't work.

    APE wrote:Are you making sure the settings are right on your JavaScript's

    like in all pages, Home page, and so on.

    some times if they are set wrong then this can give problem's
    Now, javascript is enable. It is set up for in all pages.
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15311
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    Solved Re: JS stopped working

    Post by skouliki December 14th 2019, 5:26 pm

    this is weird that the back up didn't work

    LeChat
    LeChat
    Forumember


    Posts : 39
    Reputation : 1
    Language : english, polish

    Solved Re: JS stopped working

    Post by LeChat December 14th 2019, 5:33 pm

    I did a backup option on enabled javascripts because I thought javascripts will be deleted, but it didn't. Should I try again on disabled javascript?

    Edit: Ok. It's forum during development and I don't have here any important messeges or topics. So, maybe I can deleted forum and create new one on the same adress. Or when I deleted this one, the adress will be still occupied?

    Edit 2: I didn't do anything and toolbar avatar works. Thank you everyone for help. Maybe I should wait and another javascripts start to run too. If not, I'll try to deleted the forum.
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15311
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    Solved Re: JS stopped working

    Post by skouliki December 14th 2019, 9:40 pm

    ok we will wait for your news
    dont do anyhting during the weekend

    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19325
    Reputation : 2005
    Language : fluent in dork / mumbojumbo & English haha

    Solved Re: JS stopped working

    Post by Ape December 15th 2019, 9:45 pm

    There is No point in deleting your forum it will not make any difference and if you delete your forum then you can not make one with the same address as this is saved on our servers for backup reason's and your Email address will be saved also for backup reason's.


    The problem is coming from some thing you have on the forum you have added or changed we just have to work out why the codes have stopped working that's all.



    JS stopped working Left1212JS stopped working Center11JS stopped working Right112
    JS stopped working Ape_b110
    JS stopped working Ape1010
    LeChat
    LeChat
    Forumember


    Posts : 39
    Reputation : 1
    Language : english, polish

    Solved Re: JS stopped working

    Post by LeChat December 15th 2019, 11:48 pm

    There was a bug on the site. Today, an old javascript appeared in the panel that had a content error (too many
    Code:
    });
    in code). I deleted this script (again xD), everything works now.

    Thank you for your help.
    I have silly question. Can I use "thank you" button for everyone who tried to help me or is this function reserved only for users who have solved the problem?
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: JS stopped working

    Post by SLGray December 16th 2019, 3:38 am

    The thanks button can only be used once in a topic.

    Topic Solved & Archived.



    JS stopped working Slgray10

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