Forums: Index > Village Dump > Site CSS and Javascript are broken
Note: This topic has been unedited for 35 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

Update on the situation, because you care so much (or not). I replaced YAHOO.util.Event.onContentReady with $(document).ready in MediaWiki:Common.js, and it's working again. Sort of. (Firefox now has new and improved content blocking and decided it was evil because it's loaded without HTTPS, so I had to tell it not to block "mixed active content", and now it thinks my connection isn't secure... bah.) {{title}} works, more or less, as do the custom CSS pages. Collapsible NavFrame divs don't work (see UnSignposts from 2013 and earlier, e.g. Uncyclopedia:UnSignpost/20130714). Disabled edit tabs on old forums only work with Fake Vector JS. I'll have to do some more fixing to resolve all the problems. There are also some JS gadgets with "YAHOO" in them: MediaWiki:VFH vote.js, MediaWiki:Gadget-autobp.js, MediaWiki:Gadget-quickvfd.js and MediaWiki:Gadget-autodelete.js. All but the last of those use YAHOO functions other than the one I know how to replace. However, the good news on gadgets is I got HotCat working properly. Oasis caused it to break in mainspace and several other namespaces, but it was already broken, probably since before I signed up. Now it always produces all the right links. You should try it out. It's great.

As for CSS, both MediaWiki:Common.css and MediaWiki:Wikia.css are being loaded now for some reason, which is causing trouble. I'm not yet sure what to do about this. ❦ Llwy-ar-lawr talkcontribs • 07:02 31 January 2019

I appreciate all you have done here to give users a vector experience when logging into this website Llwy-ar-lawr. You're the best! --LaurelsRomArtus*Imperator ITRA (Orate) ® 11:23, January 31, 2019 (UTC)

Autodelete is working now. I rewrote large chunks of it so it no longer depends on User:Lyrithya/dropdown.js, which is no longer imported into common.js due to Wikia rules, and to use API requests instead of going to the delete form and automatically clicking on things. The only problem is it doesn't delete the talk page, even though it's supposed to. It works on my 1.22 wiki but not here. I'll try and sort that out at some point. I don't know if anyone will actually use this, but hey, it was a learning experience. ❦ Llwy-ar-lawr talkcontribs • 09:03 6 February 2019

Thanks again Llwy-ar-lawr. I wouldn't do anymore changes until we hear from Wikia-Fandom. Sannse has promised to give us an update as regards we remain 'wikia' or 'fandom' or something else either this week or next. --LaurelsRomArtus*Imperator ITRA (Orate) ® 00:20, February 7, 2019 (UTC)