--- Comment #7 from Kevin Israel (PleaseStand) <> ---
(In reply to Kevin Israel (PleaseStand) from comment #2)
> (In reply to comment #1)
> > The most likely cause is 2bcffe8b, but why does it not work, I have no idea.
> MWException::getPageTitle() was already broken. However, it was not
> previously used for DBConnectionErrors.

It seems that I confused myself. The change looks like it did in fact cause the
bug by "[restoring the] sitename as part of error page document title" (for the
reason explained in comment 2 and comment 4).

The site name was not already there, and it turns out that
MWException::getPageTitle() is not in fact the right place to add it.

1. The OutputPage code path calls $wgOut->prepareErrorPage().
2. In turn, OutputPage::setPageTitle() is called.
3. That method sanitizes the provided HTML for use in the h1 element.
4. Then it strips any remaining HTML tags and decodes character references.
5. The resulting string is wrapped in the "pagetitle" message for use
   in the title element (after re-escaping).

The result of #5 is that when the OutputPage code path is used, the h1 element
contains the text "Internal error - {{SITENAME}}" and the title element
contains "Internal error - {{SITENAME}} - Wikipedia" (if $wgSitename =

It is only the "else" case (OutputPage not used) that is missing the site name,
and that is where text() would come in, though it might make sense to keep
msg() how it is for now to avoid breaking things (and just replace

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