Bug ID: 62426
           Summary: Undocumented inter-dependencies of default options
                    (namely wgDefaultUserOptions['rcdays'] and wgRCMaxAge)
                    with hard fail
           Product: MediaWiki
           Version: 1.23-git
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Unprioritized
         Component: User preferences
       Web browser: ---
   Mobile Platform: ---

If I set $wgRCMaxAge to a value such that ceil($wgRCMaxAge/(24*3600)) <
$wgDefaultUserOptions['rcdays'] then upon clicking "preferences" the following
scary and (perhaps intentionally) uninformative message shows up:

Internal error - {{SITENAME}}
[********] 2014-03-08 03:56:05: Fatal exception of type MWException

Upon searching the web and finding that I should activate
$wgShowExceptionDetails, I get the following more informative error message:

/wiki/Special:Preferences Exception from line 134 of
/usr/local/lib/mediawiki/includes/Preferences.php: Global default '7' is
invalid for field rcdays

and with a little more digging eventually figure out that I have
unintentionally set the number of days for retaining recent changes to be less
than the number of days to display recent changes. So I solved the immediate
problem of concern for my own system, but the following concerns remain:

1) Documentation: I added brief documentation of this inter-dependency to the
Manual pages for $wgDefaultUserOptions and $wgRCMaxAge at, since
it was not presently documented there. However, I wonder how many other such
inter-dependencies exist that remain undocumented.

2) Hard fail: Setting an integer/float to a value outside of an
elsewhere-specified-range may indeed qualify as an error, but throwing an
uncaught exception that totally crashes the page in question, without offering
a very helpful explanation as to what has gone wrong, seems a bit extreme. Or
again, choosing settings that would display up to 7 days of recent changes even
though I am only actually retaining 3 days of recent changes may be a *silly*
and partly frivolous choice of settings, but reckoning it as a hard and
unrecoverable fault seems to be going too far.

3) The situation above is actually further complicated by the fact that, from
what experience tells me, rcdays actually gets set to max(3, my setting for
$wgDefaultUserOptions['rcdays']), although I still haven't found anywhere that
the "3" bound is documented or where it occurs in the code.

In summary, I foresee that having to track down the cause of a fault to
unexpected inter-dependencies of settings to be a likely cause of headache for
other site admins in the future. Documentation of such inter-dependencies under
all affected configurable variables would be one nice step.

You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
Wikibugs-l mailing list

Reply via email to