Page MenuHomePhabricator

[RefToolbarLegacy] js error and wikitext error when editor for create page fails to appear in IE10 (at least): 'unable to get property 'appendChild' of undefined or null reference'
Closed, ResolvedPublic

Description

js error IE10 no editor

Edit a URL that does not exist e.g.

http://en.wikipedia.beta.wmflabs.org/wiki/0.721023e4802348

Click Create source

The wikitext editor sometimes not appear at all.

When this happens the error is 'unable to get property 'appendChild' of undefined or null reference'

See screen shot.

Also, styling from the ProveIt gadget sometimes appears also, even though ProveIt is unselected in Preferences for this user.

See screen shot.


Version: 1.22.0
Severity: normal

Attached:

js_error_no_editor.png (768×1 px, 106 KB)

Details

Reference
bz56117

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:32 AM
bzimport set Reference to bz56117.
bzimport added a subscriber: Unknown Object (MLST).

Created attachment 13566
proveit should not appear

Attached:

proveit_styling_upper_left.png (520×807 px, 196 KB)

line causing js error is

document.getElementById('citeselect').appendChild( reftoolformarea );

As noted by Umherirrender, that line is not part of ProveIt. It's part of RefToolbarLegacy, loaded via:

MediaWiki:Common.js -> MediaWiki:Common.js/edit.js -> MediaWiki:RefToolbarLegacy.js

Relevant to your testing, MediaWiki:Common.js/edit.js has a hard-coded reference to en.wikipedia.org, which means it's pulling stuff from prod rather than the test environment. This should be fixed.

RefToolbarLegacy.js is entirely separate from ProveIt (despite having a similar purpose).

It seems very odd that ProveIt would load without being enabled. I have never had that reported, nor do I know of any mechanism that bug could occur. If you are sure it's not being enabled somehow, and can reproduce that, you should file a separate bug against ResourceLoader.

It seems you're testing in production mode in your screenshots. Obviously, it's important to test in production mode. However, when reporting errors on specific lines, please also retest in debug mode. That will generally provide useful filenames and line numbers.

(In reply to comment #0)

Also, styling from the ProveIt gadget sometimes appears also, even though
ProveIt is unselected in Preferences for this user.

Chris and I emailed briefly about this, and I think this is this is because of http://en.wikipedia.beta.wmflabs.org/wiki/User:Selenium_user/vector.js . That file should be blanked or deleted.

Also, that is no longer a supported method of loading ProveIt (I had some out of date docs on this, but they should be right now).

When re-resting the gadget on Beta, it should be set up the same way as on English Wikipedia, with the relevant line of https://en.wikipedia.org/wiki/MediaWiki:Gadgets-definition , plus copying over the complete pages https://en.wikipedia.org/wiki/MediaWiki:Gadget-ProveIt.js and https://en.wikipedia.org/wiki/MediaWiki:Gadget-ProveIt.css .

Misconfigured by accident, closing.

Any related issues to be noted in other reports.