MyBB Community Forums

Full Version: Javascript not working in Posts and Threads?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there (my English is bad so please excuse my language!)

I have a problem with my new site. I'm building it all up and are very Happy that I managed it so far on my own.
Now I have the issue that on my Index everything works perfect, but in the Threads I can't use the Accountswitcher due to Javascript. And in the Posts I can't use anything with Javascript connected. Per example Inline Editor doesn't work or I can't use Accountswitcher and so on.

Does anyone have any Idea how I can fix that?
I already know that in the Default Style - everything works fine!
But I somehow don't get the issue with my current Design....

URL: http://backup.windsofwinters.de
Version: MyBB 1.8.12

When I move with my Mouse over an Option with Javascript (like accountswitcher) the site shows the link in the left bottom "javascript:void(0)"

Thanks in advance! Smile
No One? :/
I see is that you are using "While You Were Typing" plugin, "SCEditor WYSIWYG editor" plugin and they aren't for 1.8 MyBB (maybe you have more but I don't want to search all your web site).

Try first to deactivate all the plugins, and check one by one if everything works as intended, maybe you'll find the plugin that it's making the javascript problem.
basically multiple loading of the scripts should be avoided [eg. jquery.js , jquery.min.js ..]
Okay well the "while you were typing" Plugin isn't the one. (I can't somehow uninstall it completly? It stays in my Plugin list and when I want to remove the folders it gives me an Error.)

I will try the Solution with testing every plugin....this will take some time because I have quite a few...

@.m.: I'm not very good in all the Javascript stuff so that's why I can't say if I have many now or not. I just hope I can find it in a Plugin that's not THAT important for my Forum...

EDIT: I don't know any SCEditor WYSIWYG editor Plugin? No Plugin in my List is called that?
I have found something and need further Help! Smile

The Problem was in the header.tpl! A Link (this one below) has an Java Script wich somehow blocks the Accountswitcher and the Option to make Inline Edits etc. When I take the Code out of my header.tpl then the Accountswitcher works and it shows me the Option for "Inline Editor" and so on.

BUT!!!!

When I take it outside I have new Problems. Without this Script in the Quick Editor, Editor itself and Creating Threads the MyBB Bar above the Writingfield is gone!! Completely! And even tho it now Shows me the Inline Editor Option, when I click on it, it doesn't do anything. There is only a Circle that shows me it's loading but after that nothing happens at all. Also on the Index, the Login-Button doesn't direct the User to the Login Page.

How is that Possible and how can I fix it?
I somehow found the Bug but can't fix it because it creates a new Bug! It's really frustrating :/

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

I also created the JavaScript inside my FTP to see if the Problem was with the extern link but it doesn't change anything at all...


I'm so happy if someone could help me with this!
Thanks in Advance!!! Smile
(10-17-2017, 06:35 AM)elizzamark Wrote: [ -> ]I have found something and need further Help! Smile

The Problem was in the header.tpl! A Link (this one below) has an Java Script wich somehow blocks the Accountswitcher and the Option to make Inline Edits etc. When I take the Code out of my header.tpl then the Accountswitcher works and it shows me the Option for "Inline Editor" and so on.

BUT!!!!

When I take it outside I have new Problems. Without this Script in the Quick Editor, Editor itself and Creating Threads the MyBB Bar above the Writingfield is gone!! Completely! And even tho it now Shows me the Inline Editor Option, when I click on it, it doesn't do anything. There is only a Circle that shows me it's loading but after that nothing happens at all. Also on the Index, the Login-Button doesn't direct the User to the Login Page.

How is that Possible and how can I fix it?
I somehow found the Bug but can't fix it because it creates a new Bug! It's really frustrating :/

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

I also created the JavaScript inside my FTP to see if the Problem was with the extern link but it doesn't change anything at all...


I'm so happy if someone could help me with this!
Thanks in Advance!!! Smile


You're on the right track. You have to remove this line from your headerinclude template (MyBB has this script already included)
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

and this line has to be removed as well:
jQuery.noConflict();
I will try it very soon, thank xou! But where can I find the second Code part?
Hey, I tried it and it doesn't help. When I remove both then it only makes it Possible to use the Log In Link again. Nothing else....

Is there somebody who would like to look at my Forum from the Inside? I don't know what else to do Sad

I've found it!!!!!!!

For someone who COULD may have the same or similiar Problem:

in the headinclude it was the Line:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>

not the other one above.

Also of course I had to remove the Line JQuery.noConflict(); as well Smile

I am so happy right now!!!