Forums: Index > Village Dump > Site CSS and Javascript are broken
Note: This topic has been unedited for 216 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.
MediaWiki:Common.css, MediaWiki:Common.js and possibly other css and js interface pages seem to have no effect now. A lot of things that depend on them no longer work. So far I know about:
  • {{c}} -- see here
  • expanding signature sections -- see e.g. User:Kevillips/sigwhy
  • links with no and forced underlines (the above signature is supposed to have the former as well)
  • UnNews:Main Page obviously is not affected by its skin page; other custom skins probably don't work either
  • floating VFH vote box (should use the code at MediaWiki:VFH vote.js)
  • disabled edit tab on old forums

I don't know if it's still possible to use custom sitewide CSS and Javascript. I hope they've just moved the correct locations or there's a bug, but I'm afraid they've turned it off. I haven't looked into it. Somebody should. ❦ Llwy-ar-lawr talkcontribs • 05:39 9 June 2018

Thanks Llwy-ar-lawr. I can use your post to ask Fandoom-Wikia about this if none of us can work it out how to remedy this. --LaurelsRomArtus*Imperator ITRA (Orate) ® 10:06, June 9, 2018 (UTC)
There is also this link regards the forking away from MediaWiki:,_A_New_Approach_to_Software_Development I wonder if this has been a factor in the issues we are facing here?? --LaurelsRomArtus*Imperator ITRA (Orate) ® 10:13, June 9, 2018 (UTC)
May be this is the key. The code change requires tech approval. --LaurelsRomArtus*Imperator ITRA (Orate) ® 10:21, June 9, 2018 (UTC)
And also here: --LaurelsRomArtus*Imperator ITRA (Orate) ® 10:24, June 9, 2018 (UTC)
Site JS is enabled, but there's an error in your Common.js because it's trying to use a "YAHOO" object that doesn't exist. That means most of your onload hooks are broken until you remove all instances of YAHOO.util.Event.onContentReady function usages (as they are all waiting for #p-logo to load, which never happens). -- Cube-shaped garbage can 11:22, June 9, 2018 (UTC)
Thank you! --LaurelsRomArtus*Imperator ITRA (Orate) ® 11:32, June 9, 2018 (UTC)
But not all the things I mentioned say anything about "yahoo" in their code. Am I missing something? Has common.js not been approved recently enough?
So I take it the site CSS is supposed to be at MediaWiki:Wikia.css. The CSS link on Special:AdminDashboard also points there. Would there be any objection to my moving at least some items from common.css to wikia.css? ❦ Llwy-ar-lawr talkcontribs • 02:30 10 June 2018
By the way I've just confirmed that wikia.css works. There was momentarily a class "foo" that produced red text. ❦ Llwy-ar-lawr talkcontribs • 02:39 10 June 2018
Nobody said no, so I went ahead and copied the contents of common.css over. If this somehow causes things to be even more broken, you know who to blame. ❦ Llwy-ar-lawr talkcontribs • 05:49 11 June 2018

Oh and {{USERNAME}}. I forgot to mention that one. ❦ Llwy-ar-lawr talkcontribs • 15:31 9 June 2018

If you want to fix USERNAME right away you can put dev:InputUsername/code.js into ImportJS and then clear your cache. -- Cube-shaped garbage can 16:49, June 9, 2018 (UTC)
Thanks. BTW your sig is near invisible on a white background here! --LaurelsRomArtus*Imperator ITRA (Orate) ® 17:30, June 9, 2018 (UTC)

I don't know if anybody's paying attention to this page anymore, but I got everything from common.css working again. You may have noticed the reappearance of censored text and expanding signatures. The JavaScript problems are still unsolved, though -- maybe I'll try and learn about it and then replace the yahoo hooks. I've also found a workaround for custom page CSS. Instead of importing it to common.js, you can import it to wikia.css instead with @import. To make it only affect a single page instead of the whole site, you have to precede all the rules in the imported stylesheet with the class specific to that page, which has the name page-[pagename] (no punctuation, spaces replaced with underscores -- you can find it with the developer tools on browsers that have them). Check out Giant, fanged hams for an example of this. Its stylesheet is at MediaWiki:Giant fanged hams.css. I don't know if anyone would want all the custom page styles to be done this way while we wait for somebody to figure out the js problem. ❦ Llwy-ar-lawr talkcontribs • 20:47 15 June 2018