1

When I click on the Preferences link in our local MediaWiki (1.26.3), hosted on CentOS, I receive the following error:

Internal error
[fbd0dcc9] /index.php/Special:Preferences MWException from line 149 of /var/www/mediawiki-1.26.3/includes/Preferences.php: Global default '' is invalid for field stubthreshold
Backtrace:

#0 /var/www/mediawiki-1.26.3/includes/Preferences.php(101): Preferences::loadPreferenceValues(User, RequestContext, array)
#1 /var/www/mediawiki-1.26.3/includes/Preferences.php(1264): Preferences::getPreferences(User, RequestContext)
#2 /var/www/mediawiki-1.26.3/includes/specials/SpecialPreferences.php(67): Preferences::getFormObject(User, RequestContext)
#3 /var/www/mediawiki-1.26.3/includes/specialpage/SpecialPage.php(384): SpecialPreferences->execute(NULL)
#4 /var/www/mediawiki-1.26.3/includes/specialpage/SpecialPageFactory.php(553): SpecialPage->run(NULL)
#5 /var/www/mediawiki-1.26.3/includes/MediaWiki.php(281): SpecialPageFactory::executePath(Title, RequestContext)
#6 /var/www/mediawiki-1.26.3/includes/MediaWiki.php(714): MediaWiki->performRequest()
#7 /var/www/mediawiki-1.26.3/includes/MediaWiki.php(508): MediaWiki->main()
#8 /var/www/mediawiki-1.26.3/index.php(41): MediaWiki->run()
#9 {main}

Any assistance to resolve the issue is appreciated.

4

1 回答 1

1

出现此错误的原因有很多,但最常见的可能是 in$wgDefaultUserOptions中的值无效或缺失LocalSettings.php

可以像这样更改默认用户设置:

$wgDefaultUserOptions['editsection'] = 0;

但是,如果您添加如下内容:

$wgDefaultUserOptions = array( 'editsection' => 0, 'watchdefault' => 1, 'watchmoves' => 1, ... );

虽然一切看起来都很好,因为您现在已经覆盖了整个默认数组,但下次在软件中添加新用户设置时,您可能会遇到错误,即 MediaWiki 升级。

UserGetDefaultOptions由于使用挂钩修改默认设置的扩展程序,或者因为给出的值之一$wgDefaultUserOptions根本无效,也可能发生错误。

于 2016-06-01T19:33:15.270 回答