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
4 posters

    toolbar not showing on my index

    Anzo
    Anzo
    Forumember


    Posts : 358
    Reputation : 8
    Language : English/Arabic
    Location : Baghdad - Iraq

    In progress toolbar not showing on my index

    Post by Anzo October 1st 2015, 7:30 pm

    It's not showing here even though it's showing on all other pages in the forum: http://www.duelacademy.net/
    Ape
    Ape
    Administrator
    Administrator


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

    In progress Re: toolbar not showing on my index

    Post by Ape October 1st 2015, 7:48 pm

    Your forum is in construction so we can not see your problem,
    We need to see your problem and your forum to see what is blocking it from working.



    toolbar not showing on my index Left1212toolbar not showing on my index Center11toolbar not showing on my index Right112
    toolbar not showing on my index Ape_b110
    toolbar not showing on my index Ape1010
    Anzo
    Anzo
    Forumember


    Posts : 358
    Reputation : 8
    Language : English/Arabic
    Location : Baghdad - Iraq

    In progress Re: toolbar not showing on my index

    Post by Anzo October 1st 2015, 7:59 pm

    I'll remove the construction timer now.

    I'd appreciate if you could look into it fast Very Happy
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    In progress Re: toolbar not showing on my index

    Post by Ange Tuteur October 1st 2015, 8:00 pm

    Hi @Anzo,

    There's an error in 25134.js here's the contents :
    Code:
    $(function(){group('#FF9626').appendTo('#lastOnline');group('#24E9F0').appendTo('#lastOnline');group('#1CE695').appendTo('#lastOnline');group('#1A9169').appendTo('#lastOnline');group('#E8E8E8').appendTo('#lastOnline');group('#1F7EF2').appendTo('#lastOnline');group('#E6D21C').appendTo('#lastOnline');group('#F01616').appendTo('#lastOnline');$('#lastOnline').html($('#lastOnline').html().replace(/,\s/g,'').replace(/<\/a>/g,'</a>, '));$('p:has(#lastOnline)').html($('p:has(#lastOnline)').html().replace(/<\/a>, <\/span>/,'</a></span>'));function group(hex){return $('#lastOnline a:has(span[style="color:'+hex+'"] strong)')}});

    toolbar not showing on my index Captur83

    Literally it's saying it can't execute the replace() method because the target element ( or string ) doesn't exist.
    Ape
    Ape
    Administrator
    Administrator


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

    In progress Re: toolbar not showing on my index

    Post by Ape October 1st 2015, 8:14 pm

    Ange Tuteur wrote:Hi @Anzo,

    There's an error in 25134.js here's the contents :
    Code:
    $(function(){group('#FF9626').appendTo('#lastOnline');group('#24E9F0').appendTo('#lastOnline');group('#1CE695').appendTo('#lastOnline');group('#1A9169').appendTo('#lastOnline');group('#E8E8E8').appendTo('#lastOnline');group('#1F7EF2').appendTo('#lastOnline');group('#E6D21C').appendTo('#lastOnline');group('#F01616').appendTo('#lastOnline');$('#lastOnline').html($('#lastOnline').html().replace(/,\s/g,'').replace(/<\/a>/g,'</a>, '));$('p:has(#lastOnline)').html($('p:has(#lastOnline)').html().replace(/<\/a>, <\/span>/,'</a></span>'));function group(hex){return $('#lastOnline a:has(span[style="color:'+hex+'"] strong)')}});

    toolbar not showing on my index Captur83

    Literally it's saying it can't execute the replace() method because the target element ( or string ) doesn't exist.
    I was about to say the same thing as @Ange Tuteur



    toolbar not showing on my index Left1212toolbar not showing on my index Center11toolbar not showing on my index Right112
    toolbar not showing on my index Ape_b110
    toolbar not showing on my index Ape1010
    Anzo
    Anzo
    Forumember


    Posts : 358
    Reputation : 8
    Language : English/Arabic
    Location : Baghdad - Iraq

    In progress Re: toolbar not showing on my index

    Post by Anzo October 1st 2015, 8:19 pm

    How do i fix it?
    Ape
    Ape
    Administrator
    Administrator


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

    In progress Re: toolbar not showing on my index

    Post by Ape October 1st 2015, 8:22 pm

    Find and remove the java code until you can work out what is wrong with the code



    toolbar not showing on my index Left1212toolbar not showing on my index Center11toolbar not showing on my index Right112
    toolbar not showing on my index Ape_b110
    toolbar not showing on my index Ape1010
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    In progress Re: toolbar not showing on my index

    Post by Ange Tuteur October 1st 2015, 8:31 pm

    Remove it, and then debug it via the console. You can paste your javascript right in the console and press enter to execute it. If it finds an error it'll let you know.

    An example of an erroneous script :

    1. Paste into console
    toolbar not showing on my index Captur84

    2. Press enter, and if an error occurs click on the link to the far right of the error.
    toolbar not showing on my index Captur85

    3. That link will take you to the line the error occurred on.
    toolbar not showing on my index Captur86

    After that, you just need to figure out what doesn't exist anymore. ( or in my case define b ) Note that you should be running the code on the page you want to place it.
    Ultron's Vision
    Ultron's Vision
    Forumember


    Male Posts : 631
    Reputation : 45
    Language : English | German | HTML | JavaScript | PHP | C++ | Perl | Java
    Location : Vienna, Austria

    In progress Re: toolbar not showing on my index

    Post by Ultron's Vision October 1st 2015, 10:52 pm

    Sorry to tell, this script is NOT the issue for the error. The script is running in its own script tag and doesn't, or rather, shouldn't prevent the other scripts from executing. If it did, the not a single script on the page would be loading.

    The script at hand was also written by @Ange Tuteur himself for a previous layout with a different DOM structure.

    The other issue is found at duelacademy.net/:400, where it gives an Uncaught SyntaxError. The error is evidently an inline error, however I don't have the means to inspect it right now. I assume it's from an inserted <script> tag with inline content, however I won't rule out an error in forumotion's code.
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    In progress Re: toolbar not showing on my index

    Post by Ange Tuteur October 1st 2015, 11:28 pm

    @Ultron's Vision No, I tested it on my test forum, it throws an error and stopped executing, leaving me with no toolbar. You're right I remember now, and it's old at that. Lol

    Upon further inspection ( and prettifying ) it's definitely because lastOnline is null. Personally, I'd recommend removing the script, unless you need it. If you do, I should be able to rewrite you something better.

    Let me know. Smile
    Ultron's Vision
    Ultron's Vision
    Forumember


    Male Posts : 631
    Reputation : 45
    Language : English | German | HTML | JavaScript | PHP | C++ | Perl | Java
    Location : Vienna, Austria

    In progress Re: toolbar not showing on my index

    Post by Ultron's Vision October 1st 2015, 11:32 pm

    I'll reply tomorrow when I can reliably make out the cause. I am quite positive that a standalone script shouldn't break forumotion's features, but I will look into this as I said.
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    In progress Re: toolbar not showing on my index

    Post by Ange Tuteur October 2nd 2015, 12:02 am

    Ultron's Vision wrote:I'll reply tomorrow when I can reliably make out the cause. I am quite positive that a standalone script shouldn't break forumotion's features, but I will look into this as I said.
    No problem. Smile

    I know this happens with the sceditor and toolbar often. I think because both are defined on document ready. So if I have a script like this :
    Code:
    $(function() {
      var nothing = document.getElementById('nothing');
      nothing.innerHTML = 'null';
    });

    and "nothing" is null, but I'm setting the HTML content anyway, it'll kill both the editor and toolbar. However, if I use an immediately invoked function the toolbar and sceditor will remain working.
    Code:
    (function() {
      var nothing = document.getElementById('nothing');
      nothing.innerHTML = 'null';
    }());

    It might come down to the use of jQuery's document ready function.
    Anzo
    Anzo
    Forumember


    Posts : 358
    Reputation : 8
    Language : English/Arabic
    Location : Baghdad - Iraq

    In progress Re: toolbar not showing on my index

    Post by Anzo October 2nd 2015, 12:53 pm

    I disabled the JS for a moment to see what would happen and the toolbar showed while it was disabled.

    I've enabled it now though. I'll let you fix this with Ultron, It's his area of expertise not mine Razz
    Ultron's Vision
    Ultron's Vision
    Forumember


    Male Posts : 631
    Reputation : 45
    Language : English | German | HTML | JavaScript | PHP | C++ | Perl | Java
    Location : Vienna, Austria

    In progress Re: toolbar not showing on my index

    Post by Ultron's Vision October 3rd 2015, 9:52 pm

    I have disabled the script and turns out it was fixed that way. I still think this should not happen, but that's over now.

    I can rewrite the code myself, but if you think you can get it done really easily, feel free @Ange Tuteur
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    In progress Re: toolbar not showing on my index

    Post by Ange Tuteur October 3rd 2015, 10:09 pm

    @Ultron's Vision Yes, that's because the toolbar is executed on document ready via jQuery, so it's added to the ready list. I assume when an error occurs within that list it prevents every other script in the queue from being executed.

    Anyway, if you want to handle it I'll leave it to you. If not, I can always write a new script. Just let me know. Smile

      Current date/time is September 22nd 2024, 7:40 pm