WordPress.org

Making WordPress.org

Opened 6 months ago

Closed 5 months ago

#4143 closed defect (fixed)

Fix MediaWiki JS error on Codex pages

Reported by: jonoaldersonwp Owned by:
Milestone: Priority: normal
Component: Codex Keywords: analytics
Cc:

Description

All Codex pages currently trigger a JS error, viewable in the Chrome developer console.

Specifically, Uncaught ReferenceError: mediaWiki is not defined at wikibits.js:243

This is flooding our GA account with errors, and, I suspect causing issues with whatever it's meant to be doing.

Change History (5)

#1 @dd32
5 months ago

Looks like this is due to the Codex theme being designed for an ancient version of MediaWiki. The theme hasn't been keeping up with changes, past what's required for it to be usable.

Looks like the immediate solutions are

  1. Stop loading wikibits.js as it's dependancies are no longer met (MediaWiki has long moved onto a different JS pattern - 7 years ago)
  2. Stop loading GTM for the codex
  3. Upgrade the theme

3 is out, as we're unlikely to upgrade the theme, unless anyone with good mediawiki knowledge would like to volunteer to do so.
2 is the easiest option, but I'm sure not most ideal.
1 is therefor the best option I guess, it'll mean there's probably something broken elsewhere in the codex, but it's been broken for at least a year at this point.

Last edited 5 months ago by dd32 (previous) (diff)

#2 @jonoaldersonwp
5 months ago

Ah, good rummaging, thanks! Let's tackle option 1, if that's okay.

Last edited 5 months ago by jonoaldersonwp (previous) (diff)

#3 @dd32
5 months ago

@Otto42 Since you've got the most experience working on the Codex, any chance you can look into this?

I don't believe it's worth the effort to upgrade the skin to use the newer JS loaders, but if that's easy to test and implement I guess go for it, but just removing the erroring JS file is enough IMHO considering how long it's been 'broken'

#4 @Otto42
5 months ago

@dd32 Commit made to remove wikibits.js call in [deploy:8379].

No idea how to push that change to live though, or to clear the wiki cache. Codex isn't something we mess with everyday.

#5 @dd32
5 months ago

  • Resolution set to fixed
  • Status changed from new to closed

This has been deployed. Let us know if this is still coming up in the JS logs.

Note: See TracTickets for help on using tickets.