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

2022-08-30 22:13:38

突然之间,我所有的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

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


答案 1

发现问题。它在此错误报告中进行了描述。它显然固定在Mediawiki主节点中。已发布的版本与 PCRE 8.34 不兼容。


答案 2

您必须更改 include/MagicWord.php如下所示:此处

取代

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

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

替换此内容后,您必须清除所有站点。这可以通过在单个页面上将“?action=purge”添加到页面的URL来完成,或者通过从维护目录在命令行中运行以下命令来为所有站点执行此操作:

php purgeList.php --purge --all

推荐