Page MenuHomePhabricator

MWExceptionRenderer::reportOutageHTML() produces invalid HTML
Open, Needs TriagePublic


Mainly because it doesn't produce an <html> tag. This error page is output when the database is down/unavailable. At least somewhat related to T149481, as there are also no lang or dir attributes either. Currently on REL1_28.

And while I'm here, can we maybe get an output hook in the outage HTML? I tried setting $wgExceptionHooks['DBConnectionError'], but did not get additional output. But this is an undocumented API, so maybe I'm doing it wrong?


Event Timeline

labster created this task.Dec 24 2016, 5:22 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 24 2016, 5:22 AM
labster updated the task description. (Show Details)Dec 24 2016, 5:24 AM

OK @Aklapper, I'll bite. Convince me that the second part is a separate task, and I'll open another task. I'm rather thinking that if the call to reportOutageHTML() moved into reportHTML() ... right around here ... that all of the above will be solved at the same time.

Just because the issue has come up again and I've done more reading since then... apparently <html> and <body> elements aren't required for valid HTML 5. But the <!DOCTYPE html> is missing, and that is required. Same suggested solution as in the comment above.