$wgShowExceptionDetails = true apparently is broken
Closed, ResolvedPublic

Description

MediaWiki internal error.

Exception caught inside exception handler.

Set $wgShowExceptionDetails = true; at the bottom of LocalSettings.php to show detailed debugging information.

It is set at the bottom of my localsettings...

Reedy created this task.Oct 24 2016, 12:38 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 24 2016, 12:38 PM

I'm wondering did this break in the 1.28 alpha, if so we can add the mw 1.28 release tag.

Does this work in mw 1.27?

Reedy added a comment.Nov 20 2016, 9:09 PM

This is broken on beta too apparently -- T151159

Paladox triaged this task as High priority.Nov 20 2016, 9:31 PM

Changing to high as this makes it harder to debug things.

Reedy renamed this task from $wgShowExceptionDetails = true seems broken to $wgShowExceptionDetails = true is broken.Nov 20 2016, 9:46 PM
Reedy raised the priority of this task from High to Unbreak Now!.
Restricted Application added subscribers: Jay8g, Luke081515, TerraCodes. · View Herald TranscriptNov 20 2016, 9:46 PM
Reedy added a comment.EditedNov 20 2016, 9:50 PM

I had to do this on beta because the global isn't apparently working

diff --git a/includes/exception/MWExceptionRenderer.php b/includes/exception/MWExceptionRenderer.php
index 8fdc417..b00b2cb 100644
--- a/includes/exception/MWExceptionRenderer.php
+++ b/includes/exception/MWExceptionRenderer.php
@@ -1,5 +1,4 @@
-<?php
-/**
+<?php /**
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
@@ -52,20 +51,20 @@ class MWExceptionRenderer {
                } else {
                        if ( $eNew ) {
                                $message = "MediaWiki internal error.\n\n";
-                               if ( self::showBackTrace( $e ) ) {
+//                             if ( self::showBackTrace( $e ) ) {
                                        $message .= 'Original exception: ' .
                                                MWExceptionHandler::getLogMessage( $e ) .
                                                "\nBacktrace:\n" . MWExceptionHandler::getRedactedTraceAsString( $e ) .
                                                "\n\nException caught inside exception handler: " .
                                                        MWExceptionHandler::getLogMessage( $eNew ) .
                                                "\nBacktrace:\n" . MWExceptionHandler::getRedactedTraceAsString( $eNew );
-                               } else {
+/*                             } else {
                                        $message .= "Exception caught inside exception handler.\n\n" .
                                                "Set \$wgShowExceptionDetails = true; at the bottom of LocalSettings.php " .
                                                "to show detailed debugging information.";
                                }
                                $message .= "\n";
-                       } else {
+*/                     } else {
                                if ( self::showBackTrace( $e ) ) {
                                        $message = MWExceptionHandler::getLogMessage( $e ) .
                                                "\nBacktrace:\n" .

Though, for some weird reason, this made no difference?

diff --git a/includes/Setup.php b/includes/Setup.php
index 357c76d..7ec8fc7 100644
--- a/includes/Setup.php
+++ b/includes/Setup.php
@@ -552,7 +552,7 @@ if ( !$wgCommandLineMode ) {
        } );
 }
 
-MWExceptionHandler::installHandler();
+//MWExceptionHandler::installHandler();
 
 require_once "$IP/includes/compat/normal/UtfNormalUtil.php";
Reedy added a comment.Nov 20 2016, 9:58 PM

And as far as I'm concerned, yes, this should block REL1_28, no questions asked. Not 100% sure it's broken in REL1_28, but I filed this before 1.28.0-rc.1 was tagged..

demon added a subscriber: demon.Nov 21 2016, 6:02 PM

And as far as I'm concerned, yes, this should block REL1_28, no questions asked. Not 100% sure it's broken in REL1_28, but I filed this before 1.28.0-rc.1 was tagged..

If rMW00bee is the cause, then yeah it made rc.0 and rc.1. Easiest to just revert back out?

Reedy added a comment.Nov 21 2016, 6:07 PM

And as far as I'm concerned, yes, this should block REL1_28, no questions asked. Not 100% sure it's broken in REL1_28, but I filed this before 1.28.0-rc.1 was tagged..

If rMW00bee is the cause, then yeah it made rc.0 and rc.1. Easiest to just revert back out?

I think so, for REL1_28 definitely. Bit more reluctant to revert it out of master though

Reedy added a comment.Nov 21 2016, 6:19 PM

Looks like a few commits will need reverting...

Change 322739 had a related patch set uploaded (by Paladox):
Fix $wgShowExceptionDetails to work without having to set $wgShowDBErrorBacktrace

https://gerrit.wikimedia.org/r/322739

Change 322742 had a related patch set uploaded (by Reedy):
Replace wgShowExceptionDetails with wgShowDBErrorBacktrace on db errors

https://gerrit.wikimedia.org/r/322742

Reedy renamed this task from $wgShowExceptionDetails = true is broken to $wgShowExceptionDetails = true apparently is broken.Nov 21 2016, 9:34 PM

Seems the error message is wrong; and $wgShowDBErrorBacktrace needs to be true

Change 322772 had a related patch set uploaded (by Paladox):
Revert I5dfdc84e94ddac65417226cf7c84513ebb9f9faa and I671f1a88f0192a5199cfc9c6d7fbde1bff5c4ac8

https://gerrit.wikimedia.org/r/322772

Change 322777 had a related patch set uploaded (by Reedy):
Replace wgShowExceptionDetails with wgShowDBErrorBacktrace on db errors

https://gerrit.wikimedia.org/r/322777

Change 322742 merged by jenkins-bot:
Replace wgShowExceptionDetails with wgShowDBErrorBacktrace on db errors

https://gerrit.wikimedia.org/r/322742

Anomie closed this task as Resolved.Nov 22 2016, 6:10 PM
Anomie assigned this task to Reedy.

Change 322777 merged by jenkins-bot:
Replace wgShowExceptionDetails with wgShowDBErrorBacktrace on db errors

https://gerrit.wikimedia.org/r/322777

Change 322772 abandoned by Paladox:
Revert I5dfdc84e94ddac65417226cf7c84513ebb9f9faa and I671f1a88f0192a5199cfc9c6d7fbde1bff5c4ac8

https://gerrit.wikimedia.org/r/322772

Change 322739 abandoned by Paladox:
Fix $wgShowExceptionDetails to work without having to set $wgShowDBErrorBacktrace

https://gerrit.wikimedia.org/r/322739