Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

All my MediaWiki pages are blank

Tags:

php

mediawiki

All of a sudden, all my Mediawiki pages are blank. If I click the edit field, the content is still, there. Ive checked the sqlite file and it looks just fine. Ive turned on debugging output and get the following:

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

Are these errors most likely the cause of the issue? If so, how do I resolve it? And if not, anyone have any idea on what might be the problem?

like image 592
ardevd Avatar asked Jan 03 '14 14:01

ardevd


People also ask

Where does MediaWiki store pages?

MediaWiki stores important data in two places: Database. Pages and their contents, users and their preferences, metadata, search index, etc. File system.


2 Answers

Found the issue. Its described in this bug report. Its apparently fixed in the Mediawiki master. The released versions are not compatible with PCRE 8.34.

like image 140
ardevd Avatar answered Oct 20 '22 07:10

ardevd


You have to change includes/MagicWord.php as shown here: here

Replace

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

With

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

After Replacing this you have to purge all sites. This can be done on single pages with adding "?action=purge" to the url of the page or for all sites by running this in command line from the maintenance directory:

php purgeList.php --purge --all
like image 34
blacksunshineCoding Avatar answered Oct 20 '22 09:10

blacksunshineCoding