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.
The forum of the forums
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, 8: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, 9: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, 9: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, 9: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, 9: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, 9: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 : 51554
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: JS stopped working

    Post by SLGray December 14th 2019, 12: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, 12: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, 6: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, 1: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 : 15391
    Reputation : 1709
    Language : English,Greek
    Location : Greece

    Solved Re: JS stopped working

    Post by skouliki December 14th 2019, 1: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, 2: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 : 15391
    Reputation : 1709
    Language : English,Greek
    Location : Greece

    Solved Re: JS stopped working

    Post by skouliki December 14th 2019, 2: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, 2:30 pm

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

    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15391
    Reputation : 1709
    Language : English,Greek
    Location : Greece

    Solved Re: JS stopped working

    Post by skouliki December 14th 2019, 2: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, 2: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 : 15391
    Reputation : 1709
    Language : English,Greek
    Location : Greece

    Solved Re: JS stopped working

    Post by skouliki December 14th 2019, 2: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, 2: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 : 19432
    Reputation : 2010
    Language : fluent in dork / mumbojumbo & English haha

    Solved Re: JS stopped working

    Post by Ape December 14th 2019, 3: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, 3: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 : 15391
    Reputation : 1709
    Language : English,Greek
    Location : Greece

    Solved Re: JS stopped working

    Post by skouliki December 14th 2019, 3: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, 3: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 : 15391
    Reputation : 1709
    Language : English,Greek
    Location : Greece

    Solved Re: JS stopped working

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

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

    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19432
    Reputation : 2010
    Language : fluent in dork / mumbojumbo & English haha

    Solved Re: JS stopped working

    Post by Ape December 15th 2019, 7: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, 9: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 : 51554
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: JS stopped working

    Post by SLGray December 16th 2019, 1: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.

      Current date/time is November 11th 2024, 6:20 pm