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.

JS stopped working

5 posters

Go down

Solved JS stopped working

Post by LeChat Fri 13 Dec 2019 - 20:30

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 Sun 15 Dec 2019 - 21:48; edited 1 time in total
LeChat
LeChat
Forumember

Posts : 39
Reputation : 1
Language : english, polish

http://cadikim.forumpl.net

Back to top Go down

Solved Re: JS stopped working

Post by TheCrow Fri 13 Dec 2019 - 21:06

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!
TheCrow
TheCrow
Manager
Manager

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

https://www.inforumgr.com

Back to top Go down

Solved Re: JS stopped working

Post by LeChat Fri 13 Dec 2019 - 21:28

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.
LeChat
LeChat
Forumember

Posts : 39
Reputation : 1
Language : english, polish

http://cadikim.forumpl.net

Back to top Go down

Solved Re: JS stopped working

Post by TheCrow Fri 13 Dec 2019 - 21:34

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!
TheCrow
TheCrow
Manager
Manager

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

https://www.inforumgr.com

Back to top Go down

Solved Re: JS stopped working

Post by LeChat Fri 13 Dec 2019 - 21:37

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

Posts : 39
Reputation : 1
Language : english, polish

http://cadikim.forumpl.net

Back to top Go down

Solved Re: JS stopped working

Post by SLGray Sat 14 Dec 2019 - 0:07

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.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51554
Reputation : 3524
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: JS stopped working

Post by LeChat Sat 14 Dec 2019 - 0:22

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

Posts : 39
Reputation : 1
Language : english, polish

http://cadikim.forumpl.net

Back to top Go down

Solved Re: JS stopped working

Post by TheCrow Sat 14 Dec 2019 - 6:53

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!
TheCrow
TheCrow
Manager
Manager

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

https://www.inforumgr.com

Back to top Go down

Solved Re: JS stopped working

Post by LeChat Sat 14 Dec 2019 - 13:11

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?
LeChat
LeChat
Forumember

Posts : 39
Reputation : 1
Language : english, polish

http://cadikim.forumpl.net

Back to top Go down

Solved Re: JS stopped working

Post by skouliki Sat 14 Dec 2019 - 13:40

you might have a conflict between js

can you try to enable one by one
skouliki
skouliki
Manager
Manager

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

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: JS stopped working

Post by LeChat Sat 14 Dec 2019 - 14:17

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.
LeChat
LeChat
Forumember

Posts : 39
Reputation : 1
Language : english, polish

http://cadikim.forumpl.net

Back to top Go down

Solved Re: JS stopped working

Post by skouliki Sat 14 Dec 2019 - 14:26

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?
skouliki
skouliki
Manager
Manager

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

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: JS stopped working

Post by LeChat Sat 14 Dec 2019 - 14:30

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

LeChat
LeChat
Forumember

Posts : 39
Reputation : 1
Language : english, polish

http://cadikim.forumpl.net

Back to top Go down

Solved Re: JS stopped working

Post by skouliki Sat 14 Dec 2019 - 14:31

did you add any css codes?
skouliki
skouliki
Manager
Manager

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

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: JS stopped working

Post by LeChat Sat 14 Dec 2019 - 14:34

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.).
LeChat
LeChat
Forumember

Posts : 39
Reputation : 1
Language : english, polish

http://cadikim.forumpl.net

Back to top Go down

Solved Re: JS stopped working

Post by skouliki Sat 14 Dec 2019 - 14:38

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
skouliki
skouliki
Manager
Manager

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

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: JS stopped working

Post by LeChat Sat 14 Dec 2019 - 14:56

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.
LeChat
LeChat
Forumember

Posts : 39
Reputation : 1
Language : english, polish

http://cadikim.forumpl.net

Back to top Go down

Solved Re: JS stopped working

Post by Ape Sat 14 Dec 2019 - 15:08

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
Ape
Ape
Administrator
Administrator

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

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: JS stopped working

Post by LeChat Sat 14 Dec 2019 - 15:20

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.
LeChat
LeChat
Forumember

Posts : 39
Reputation : 1
Language : english, polish

http://cadikim.forumpl.net

Back to top Go down

Solved Re: JS stopped working

Post by skouliki Sat 14 Dec 2019 - 15:26

this is weird that the back up didn't work
skouliki
skouliki
Manager
Manager

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

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: JS stopped working

Post by LeChat Sat 14 Dec 2019 - 15:33

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.
LeChat
LeChat
Forumember

Posts : 39
Reputation : 1
Language : english, polish

http://cadikim.forumpl.net

Back to top Go down

Solved Re: JS stopped working

Post by skouliki Sat 14 Dec 2019 - 19:40

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

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

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: JS stopped working

Post by Ape Sun 15 Dec 2019 - 19:45

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
Ape
Ape
Administrator
Administrator

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

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: JS stopped working

Post by LeChat Sun 15 Dec 2019 - 21:48

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?
LeChat
LeChat
Forumember

Posts : 39
Reputation : 1
Language : english, polish

http://cadikim.forumpl.net

Back to top Go down

Solved Re: JS stopped working

Post by SLGray Mon 16 Dec 2019 - 1:38

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.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51554
Reputation : 3524
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum