我的所有MediaWiki页面都是空白的

时间:2014-01-03 14:17:03

标签: php mediawiki

突然间,我的所有Mediawiki页面都是空白的。如果我单击编辑字段,内容仍然是,那里。我已经检查了sqlite文件,它看起来很好。我已打开调试输出并获得以下内容:

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /usr/share/webapps/mediawiki/includes/MagicWord.php on line 907

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /usr/share/webapps/mediawiki/includes/MagicWord.php on line 881

Warning: Invalid argument supplied for foreach() in /usr/share/webapps/mediawiki/includes/MagicWord.php on line 882

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /usr/share/webapps/mediawiki/includes/MagicWord.php on line 886

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /usr/share/webapps/mediawiki/includes/MagicWord.php on line 881

Warning: Invalid argument supplied for foreach() in /usr/share/webapps/mediawiki/includes/MagicWord.php on line 882

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /usr/share/webapps/mediawiki/includes/MagicWord.php on line 886

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /usr/share/webapps/mediawiki/includes/MagicWord.php on line 907

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /usr/share/webapps/mediawiki/includes/MagicWord.php on line 907

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /usr/share/webapps/mediawiki/includes/MagicWord.php on line 907

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /usr/share/webapps/mediawiki/includes/MagicWord.php on line 907

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /usr/share/webapps/mediawiki/includes/MagicWord.php on line 907

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /usr/share/webapps/mediawiki/includes/MagicWord.php on line 907

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /usr/share/webapps/mediawiki/includes/MagicWord.php on line 907

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /usr/share/webapps/mediawiki/includes/MagicWord.php on line 881

Warning: Invalid argument supplied for foreach() in /usr/share/webapps/mediawiki/includes/MagicWord.php on line 882

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /usr/share/webapps/mediawiki/includes/MagicWord.php on line 886

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /usr/share/webapps/mediawiki/includes/MagicWord.php on line 881

Warning: Invalid argument supplied for foreach() in /usr/share/webapps/mediawiki/includes/MagicWord.php on line 882

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /usr/share/webapps/mediawiki/includes/MagicWord.php on line 886

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /usr/share/webapps/mediawiki/includes/MagicWord.php on line 907

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /usr/share/webapps/mediawiki/includes/MagicWord.php on line 907

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /usr/share/webapps/mediawiki/includes/MagicWord.php on line 907

这些错误最有可能是问题的原因吗?如果是这样,我该如何解决?如果没有,任何人都不知道可能出现什么问题?

3 个答案:

答案 0 :(得分:16)

发现了这个问题。它在this bug report中描述。它显然固定在Mediawiki大师身上。发布的版本与PCRE 8.34不兼容。

答案 1 :(得分:6)

您必须更改includes / MagicWord.php,如下所示: here

替换

$group = "(?P<{$i}_{$name}>" . preg_quote( $syn, '/' ) . ')';

使用

$it = strtr( $i, '0123456789', 'abcdefghij' );
$group = "(?P<{$it}_{$name}>" . preg_quote( $syn, '/' ) . ')';

更换后,您必须清除所有网站。这可以在单个页面上完成,在页面的URL中添加“?action = purge”,或者通过在维护目录的命令行中运行它来为所有站点添加:

php purgeList.php --purge --all

答案 2 :(得分:0)

从Trusty升级到Xenial(Ubuntu)后,我遇到了相同的症状,但这不是PCRE问题。在我的情况下,它通过禁用Widgets扩展来解决,我通过在LocalSettings.php中注释掉这一行来做...

require_once("$IP/extensions/Widgets/Widgets.php");

我在Mediawiki的v1.28.0上有小部件的v1.0。