Page MenuHomePhabricator

Error when ProveIt gadget is enabled and NWE beta is enabled at the same time
Closed, ResolvedPublic1 Estimated Story Points

Description

When you have NWE beta enabled, then proveit will throw an error.

It will fail inside the prove() function, because var wikitext = proveit.getTextbox().val() will return null, as there is no wptextbox1 on the page in this case.

Event Timeline

The loader assumes that action=edit means the classic editor will be available, it should also check for the existence of #wpTextbox1.

Sophivorus closed this task as Resolved.EditedJan 30 2018, 10:45 PM
Sophivorus claimed this task.
Sophivorus subscribed.

I updated the initialization code so that it checks for the existence of the #wpTextbox1 element before loading ProveIt. See https://commons.wikimedia.org/wiki/Help:Gadget-ProveIt or https://en.wikipedia.org/wiki/MediaWiki:Gadget-ProveIt.js

I also updated the initialization code of all the Wikipedias using ProveIt.

Jdforrester-WMF renamed this task from Error when gadget is enabled and NWE beta is enabled at the same time to Error when ProveIt gadget is enabled and NWE beta is enabled at the same time.Jan 31 2018, 12:18 AM
Jdforrester-WMF set the point value for this task to 1.