Page MenuHomePhabricator

Editing not possible at tt.wikipedia.org (due to error in MediaWiki:Common.js)
Closed, ResolvedPublic

Description

Per https://www.mediawiki.org/w/index.php?title=Topic:Thapndnvwxb6j1kt&topic_showPostId=thapndnxh3puza9p#flow-post-thapndnxh3puza9p .
I was able to create a new page in VE in Chrome, and to edit it in Opera. After this, nothing happens after clicking on Edit, while clicking on Edit source loads the wikitext editor without a toolbar.

(Seems UBN! to me, apologies in case you disagree.)

Event Timeline

Elitre triaged this task as Unbreak Now! priority.Dec 16 2016, 2:08 PM
Elitre updated the task description. (Show Details)

Going to https://tt.wikipedia.org/wiki/Чирмешләр?veaction=edit&debug=true , the Developer Tools of my browser show

TypeError: mw.util.$content is null

which comes from line 39 in https://tt.wikipedia.org/wiki/МедиаВики:Common.js : mw.util.$content.find( 'h2' )

This error needs to get fixed by the local sysops of tt.wikipedia.org.

This probably happens because of mw.util.$content in Common.js. I had a somewhat similar problem in the Japanese Wikipedia recently, see https://ja.wikipedia.org/wiki/MediaWiki%E2%80%90%E3%83%8E%E3%83%BC%E3%83%88:Gadgets-definition .

I'll post a suggested fix at the talk page in tt.wiki.

Assuming that's the correct fix, I'd love to know whether other wikis are affected.

Aklapper renamed this task from Editing not possible at tt.wikipedia.org to Editing not possible at tt.wikipedia.org (due to error in MediaWiki:Common.js).Dec 16 2016, 5:36 PM

Assuming that's the correct fix, I'd love to know whether other wikis are affected.

T153476 feels pretty similar.

Krinkle claimed this task.
Krinkle subscribed.

Going to https://tt.wikipedia.org/wiki/Чирмешләр?veaction=edit&debug=true , the Developer Tools of my browser show

TypeError: mw.util.$content is null

which comes from line 39 in https://tt.wikipedia.org/wiki/МедиаВики:Common.js : mw.util.$content.find( 'h2' )

This error needs to get fixed by the local sysops of tt.wikipedia.org.

Fixed in revision 2144550.

Assuming that's the correct fix, I'd love to know whether other wikis are affected.

T153476 feels pretty similar.

Can anyone run a query or something? the smallest wikis are unlikely to report that they are being affected, and will just wait hoping for a fix that won't come.

@Elitre Unfortunately not. I did run a few queries looking for this pattern but only found false positives. mw.util.$content hasn't changed and isn't broken. And most code on wikis that uses this also continues to work fine.

The problem is that some wikis were referencing mw.util in their Common.js without ensuring first that the "mediawiki.util" module has finished loading. Most likely it was copied-pasted by a local sysop from another wiki without the proper context and was either already broken or worked by chance so far because something else somewhere already loaded the module.

I don't know what triggered this for those two wikis in particular, but without more information I don't think this was a regression caused by a deployment on our side.