A partial archive of https://discourse-mediawiki.wmflabs.org as of Saturday May 21, 2022.

How to resolve blank page problem?

sepwolves

I used to install Scribunto extension yesterday. While I failed. I just did as the manual says:
Installation

https://www.mediawiki.org/wiki/Extension:Scribunto#Installation

If using Vagrant, install with vagrant roles enable scribunto --provision

Manual installation

Download and place the file(s) in a directory called Scribunto in your extensions/ folder.

Add the following code at the bottom of your LocalSettings.php:

wfLoadExtension( 'Scribunto' );
$wgScribuntoDefaultEngine = 'luastandalone';

Set execute permissions for the Lua binaries bundled with this extension:

chmod a+x /path/to/extensions/Scribunto/engines/LuaStandalone/binaries/yourOS/lua

Set type to httpd_sys_script_exec_t if SELinux is enforced:

chcon -t httpd_sys_script_exec_t /path/to/extensions/Scribunto/engines/LuaStandalone/binaries/yourOS/lua

Yes Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

To users running MediaWiki 1.29 or earlier:

The instructions above describe the new way of installing this extension using wfLoadExtension() If you need to install this extension on these earlier versions (MediaWiki 1.29 and earlier), instead of wfLoadExtension( ‘Scribunto’ );, you need to use:

Later on I found that my site has become blank.
I disable the extensions of Scribunto. Not work. And I delted the line in LocalSettings.php. Still no work. So I disable all extensions. Still no work.

And I did as the manual says:(https://www.mediawiki.org/wiki/Manual:Errors_and_symptoms#You_see_a_Blank_Page)

add the following lines to the LocalSettings.php file, underneath the <?php:

error_reporting( E_ALL );
ini_set( ‘display_errors’, 1 );

and then I could see the error information. But I still don’t know how to resolve that.

I just wondered how I could resolve the problem?(I used to change the memory limit size before the Scribunto extension installed. But after that my site could still work(I uploaded several file then.)

srishakatux

Could you paste the error log here so that we know what exactly the cause of the problem is? Also, what is your memory limit setting and what version you are using?

sepwolves

yes。 my site is http://140.143.85.41/ below is the error log:
my memory limit is 99m, and my mediawiki is 1.30.0 version.

Fatal error: Uncaught Error: Call to a member function getCode() on null in /var/www/html/includes/user/User.php:1594 Stack trace: #0 /var/www/html/includes/user/User.php(5272): User::getDefaultOptions() #1 /var/www/html/includes/user/User.php(2884): User->loadOptions() #2 /var/www/html/includes/context/RequestContext.php(364): User->getOption(‘language’) #3 /var/www/html/includes/Message.php(380): RequestContext->getLanguage() #4 /var/www/html/includes/Message.php(1275): Message->getLanguage() #5 /var/www/html/includes/Message.php(842): Message->fetchMessage() #6 /var/www/html/includes/Message.php(934): Message->toString(‘text’) #7 /var/www/html/includes/exception/MWExceptionRenderer.php(200): Message->text() #8 /var/www/html/includes/exception/MWExceptionRenderer.php(304): MWExceptionRenderer::msg(‘dberr-again’, ‘Try waiting a f…’) #9 /var/www/html/includes/exception/MWExceptionRenderer.php(51): MWExceptionRenderer::reportOutageHTML(Object(Wikimedia\Rdbms\DBConnectionError)) #10 /var/www/html/includes/exception/MWExce in /var/www/html/includes/user/User.php on line 1594

srishakatux

While I recruit someone from the dev community to help you investigate more, could you ensure if there are no problems while updating the DB? Were you able to execute the update script without running into errors https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script?

samwilson

Your site seems to be up again, that’s good.

Could the problem have been something odd happening to $wgLanguageCode in LocalSettings.php?

sepwolves

thanks for everybody. After I rebooted the system, the problem is resolved. Although I don’t know why, anyway I could see the page now…

sepwolves

I thought it might have nothing to do with $wgLanguageCode. Thanks you/

sepwolves

Problem resolved by using reboot the system…

Tgr

So the error was triggered before $wgContentLang was set up (or setting it up itself triggered the error) and the error page is trying to localize itself and in the process looking up the content language. That sounds like a MediaWiki bug. (Also it tries to check user language settings, which is probably a bad idea for an error page to do.)