Page MenuHomePhabricator

Use of "wgWikiEditorEnabledModules" is deprecated. Use mw.config instead. (in SF_wikieditor.js)
Closed, ResolvedPublic

Description

On our wiki the wikieditor would sometimes not load with the following syntax in the form:

{{{standard input|free text|editor=wikieditor|rows=25}}}

It seems that this was caused by some "old" js code in our mediawiki:common.js so that is fixed.

During debugging I did notice the above warning (it comes twice). The root is the following line in SF_wikieditor.js

if ( wgWikiEditorEnabledModules && wgWikiEditorEnabledModules.hidesig === true ) {

I changed it to:

if ( mw.config.get( 'wgWikiEditorEnabledModules' ) && mw.config.get( 'wgWikiEditorEnabledModules.hidesig' ) === true ) {

I do not know if this is correct but the editor loads fine now and the warnings are gone.

Config:

  • MW-1.26.3
  • SF 3.7
  • PHP 7.0.11
  • WikiEditor 0.5.0

Event Timeline

Change 315239 had a related patch set (by Paladox) published:
Replace wgWikiEditorEnabledModules with mw.config.get('wgWikiEditorEnabledModules')

https://gerrit.wikimedia.org/r/315239

Change 315239 merged by Yaron Koren:
Replace wgWikiEditorEnabledModules with mw.config.get('wgWikiEditorEnabledModules')

https://gerrit.wikimedia.org/r/315239

Resolved, I assume.

Change 315268 had a related patch set uploaded (by Paladox):
Replace wgWikiEditorEnabledModules with mw.config.get('wgWikiEditorEnabledModules')

https://gerrit.wikimedia.org/r/315268

Change 315269 had a related patch set uploaded (by Paladox):
Replace wgWikiEditorEnabledModules with mw.config.get('wgWikiEditorEnabledModules')

https://gerrit.wikimedia.org/r/315269

Change 315269 abandoned by Paladox:
Replace wgWikiEditorEnabledModules with mw.config.get('wgWikiEditorEnabledModules')

https://gerrit.wikimedia.org/r/315269

Change 315268 abandoned by Paladox:
Replace wgWikiEditorEnabledModules with mw.config.get('wgWikiEditorEnabledModules')

https://gerrit.wikimedia.org/r/315268