Admin Forum:Scripts not loaded

Forums: Admin Central Index → Technical Help → Scripts not loaded Wikia's forums are a place for the community to help other members. To contact staff directly or to report bugs, please use Special:Contact.

It seems that my common.js is not loaded, does anyone see any errors?


 * Heh, awesome.  has a badly explained syntax. It'll be faster just to show you how to fix it:


 * The short version: The article paths are NOT interwiki links, they are the internal database name for the target site ("w:database:ArticlePath"). To find what the database name is for a given site, you'll need to use the javascript console in your browser on that target site to get the value of  (it is usually just the subdomain on Wikia though).
 * It may be worth filing a bug, the help page does not explain this so it may not be intentional. Lunarity 17:52, August 27, 2012 (UTC)


 * The help page sure is misleading: "This method will work with local articles (such as "MediaWiki:Wikia.js") or external articles (such as "w:c:dev:Mediawiki:External_include.js" -- see Interwiki Links for more information)". Thank you, I would never figure that out.


 * The trick there is that, for English Wikis, the database name is the same as the site subdomain:  is kept in a database called 'onepiece' so 'w:c:onepiece' works fine. Apparently whoever designed this didn't consider the non-English wikis. Lunarity 19:19, August 27, 2012 (UTC)


 * Although I tried to clear my cache many times, it seem that they are still not loading... if they would be, you should see a time clock on the top-right for example. Moreover I forgot to mention that there is this weird bug that loads only the first image on the right column in the main page... if I don't find a solution soon I'll just special:contact this.


 * Well, it does sort of work. I can see the  now works, along with some other stuff. Unfortunately, the URL contains a mess:
 * I've highlighted the broken parts in bold, only those 2 aren't loading (the clock and skin switch). I'm not sure what's causing that though. It should look like this:
 * Which does load correctly and contain all the scripts. I'll look in to how  works internally, it might be screwing something up. Lunarity 19:19, August 27, 2012 (UTC)
 * Which does load correctly and contain all the scripts. I'll look in to how  works internally, it might be screwing something up. Lunarity 19:19, August 27, 2012 (UTC)
 * Which does load correctly and contain all the scripts. I'll look in to how  works internally, it might be screwing something up. Lunarity 19:19, August 27, 2012 (UTC)


 * Okay, got it. That piece of junk in the URL is a unicode character: Unicode character 8206. It's invisible to us because it's a control character that instructs the browser on how to display text properly but the JavaScript engine can see it and is including it in the URL sent to the server which is why it's broken. I suspect you copy and pasted some of those filenames from somewhere else and unfortunately brought that little evil tag-along with it.
 * Anyway, I've fixed the script here in the forum, switch to source mode and copy/paste it into your Common.js. Or, for fun, go into your Common.js, place the cursor here:


 * and press backspace once. The cursor won't move but something will be deleted. Talk about a damn obscure problem :). Lunarity 19:42, August 27, 2012 (UTC)


 * WOW! That's true... I would never found that! I'll correct it right away... I guess it was the same problem causing this CSS to break up, as you can see I fixed although I didn't know what I've fixed! (I just rewrote it) How can I check if that character is present though? I may have the same problem in the future...

(reset indent) Now it seems that it's working, though there is still that problem in the main page... any ideas? And if you know a handy way to spot that character right away tell me please. Thank you anyway.


 * These sorts of 'magic' characters give programmers nightmares since every character, even invisible ones, matter to the computer itself; people spend hours debugging for something that you simply cannot see with your eyes. I wouldn't have caught this if it wasn't for the fact I was already looking at the output URL (I ran %E2%80%8E through  and got a blank string which is when it clicked, so I did   and got 8206).


 * Avoiding this sort of awfulness is hard, the best I can suggest is that you paste your code into Notepad then save the file with "ANSI" as the character encoding. When you exit and reopen it, all the Unicode characters will have been converted to '?' which means that you can now see where those invisible ones are. If you use Notepad++, it provides an Encoding&gt;Convert to ANSI which will achieve the same without needing to save and reopen.


 * I found this Stack Overflow question related to this exact sort of problem: . I could write a gadget for /  that would automatically fix this sort of thing when you click publish, that might be worthwhile.


 * As for the main page, I'm not sure I see the problem. All the images seem to be loading for me, though I don't know what it's supposed to look like. Can you give me a more detailed description of what I should look for? Lunarity 21:34, August 27, 2012 (UTC)


 * Okay, I'm an idiot. I was looking in the wrong tab. I see the problem with the main page. One of Wikia's scripts is looking for the Wiki's contribute button but it doesn't exist so the script is crashing which then causes everything to explode and die. I don't think you can fix that, (you could try creating a fake contribute button) the problem is in Wikia's stuff. Lunarity 22:16, August 27, 2012 (UTC)


 * @Lunarity:
 * "[...] The article paths are NOT interwiki links, they are the internal database name for the target site ('w:database:ArticlePath'). [...] It may be worth filing a bug, the help page does not explain this so it may not be intentional."
 * I completely agree. Would you please report this to Staff! That sounds very wrong. It should either be a proper interwiki link or something else entirely. Some weird pseudo-construct that kind of behaves like an interwiki link - except when it doesn't - serves nobody.
 * @Leviathan_89: You can find a fix for your main page problem here. Unfortunately it's a very common one. The main pages of all answers wikis are broken after the MediaWiki update. The bug has been reported, but you shouldn't get your hopes up. Apparently answers wikis rank very low on Wikia's priority list. --

Okay, here: w:c:dev:AntiUnicruft. I wrote a gadget that automatically strips out those invisible characters as soon as you click Publish/Save, just add it to your  or   or whatever and hopefully this won't happen again. Lunarity 09:00, August 28, 2012 (UTC)


 * Really thank you guys, I'll definitely try your code Lunarity, I don't want to have "nightmares" anymore! : )


 * "The bug has been reported, but you shouldn't get your hopes up. Apparently answers wikis rank very low on Wikia's priority list." <-- That's painful true.