Shape 5

Joomla Templates => Gamers - Club => : Brewer August 17, 2016, 10:58:26 PM



: Possible theme issue?
: Brewer August 17, 2016, 10:58:26 PM
Thought I'd make a new post now heh. I don't know if this is a theme issue, but, if someone can help me correct it there may be cookies coming your way, wink wink.

I'm experimenting with a javascript that displays my Discord server (discord is a VOIP thing).  What's weird is, it works just fine on my forum page:
http://swordofthedragon.org/guild-forums

But on any other page, it does not work, just blank. I do see an error with the website tools:
:
discord-widget.min.js:1 Uncaught TypeError: Cannot read property 'append' of null

I'm not too sure how to fix that, or why it is happening on every page but my forums. I don't know if its a template thing like I said, but hoping someone can help me out :/


: Re: Possible theme issue?
: jonahh August 18, 2016, 03:08:29 PM
Hello,

Hmm I'm not sure, I would contact the authors of the widget and they'd be better able to assist you with this. It seems to be an issue with the JS from the Discord widget. We use jQuery no conflict mode for all our JS so I don't think its a template issue. I do see that Discord isn't using it as its calling $("head") instead of jQuery("head"). This might be causing the issue but you'd have to check with Discord author.


: Re: Possible theme issue?
: Brewer August 20, 2016, 11:18:48 PM
Alright, you are the second person to say that so I'll send them a ticket.  Seems like everytime I make a Joomla site I have major Javascript issues/conficts and I really don't know how to correct those :(


: Re: Possible theme issue?
: jonahh August 22, 2016, 11:20:32 AM
Yeah mixing extensions can do this. It depends on the authors too and how they code them. We try to make sure our Javascript doesn't conflict with others. Hopefully they'll be able to fix this up for you.


: Re: Possible theme issue?
: Brewer August 22, 2016, 01:28:33 PM
Well the creators of Discord don't make this javascript, this is made by a random normal fellow. Discord makes an iframe widget, but, I'm not a big fan of iframes with the non-auto height and such.


: Re: Possible theme issue?
: Brewer August 24, 2016, 08:17:43 PM
Actually a big thanks you helped me fix this. I took the javascript and copied/pasted it so I could have it hosted locally, then I did a Find/replace for "$" and made them all "jQuery" and now it's working. I don't know javascript but that worked out :)

In fact this also led me to fix some javascript issues on my forums, they were having the same issues, so doubly thanks.  I know this isn't your problem but if you get bored, can you give me another awesome hint on my forum error. You can't see this one because it's an admin thing, but it's trying to use javascript to switch pages, and its calling an error:

jquery.min.js:2 Uncaught Error: Syntax error, unrecognized expression: #page-tabs http://swordofthedragon.org/guild-forums/subway-options-panel#general-options
This one is being called from google so I can't edit it, from http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js

If you have any hints again I'd appreciate it much :)


: Re: Possible theme issue?
: jonahh August 25, 2016, 11:20:53 AM
Awesome happy to hear you got it fixed and I was able to help! For the other error not sure, it looks like it having trouble calling the tabs. Maybe its looking for one that isn't there? Not sure.


: Re: Possible theme issue?
: Brewer August 25, 2016, 11:58:36 AM
Ah well, I thought perhaps the #page-tab thing was something Joomla doesn't like, like the $. I'll have to have a deeper look at it when I get home.  That and the fix for the Discord Widget and the fix for the forums (changing $ to jQuery) work separately but not on the same page. On the forum page the discord widget breaks. So that's weird. Javascript is not fun :(


: Re: Possible theme issue?
: jonahh August 26, 2016, 01:52:51 PM
There might be forum Javascript breaking it then if its only on the forum page, you could check in debug console of firebug to see if any errors are showing.


: Re: Possible theme issue?
: Brewer August 27, 2016, 03:35:26 PM
Oh I know there are errors, fixing them is the hard part :)  Still working on the first thing...I think Joomla has some sort of issue with the href=#tabname I just don't know what it is. Oh wells :/