Page MenuHomePhabricator

Special:Contributions without parameter should not use custom error page
Closed, ResolvedPublic2 Estimated Story Points

Description

This is the second half of T155053. Basically, the 404 error page in mobile front end has a very short HTML where the <html> tag lacks the 'lang' and 'dir' attributes, and the HTML also lacks the <meta charset...> tag. These should be added so that the 404 message is well-formed and shown correctly in RTL wikis.

This is because it invokes a 404 using wfHttpError
This should be updated to do things the MediaWiki way™

Acceptance criteria

  • Use $this->getOutput()->setStatusCode( 404 );
  • Use $this->getOutput()->addHTML
  • Show a less generic error on bad contributions link. Suggested text below

Suggested error text for contributions 404

  • Heading: Bad username given
  • Description: Cannot look for contributions without a user or with a user that does not exist.

Details

Event Timeline

Why is it even handling that ? Could it not just kick it back to the same error handler as we use everywhere else ?

being:
operations-mediawiki-config/errorpages/404.php

Jdlrobson renamed this task from Add `lang` and `dir` attributes to the HTML of 404 errors in mobile frontend to Special:Contributions without parameter should not use custom error page.Jan 26 2017, 9:09 PM
Jdlrobson added a project: good first task.
Jdlrobson subscribed.

@TheDJ how is that used? Using $context->getOutput()->setStatusCode( 404 ) ?

Change 356878 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Error the official mediawiki way

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

Change 356878 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Error the official mediawiki way

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

phuedx subscribed.

I'll sign this off as @Jdlrobson worked on it.

This is the second half of T155053. Basically, the 404 error page in mobile front end has a very short HTML where the <html> tag lacks the 'lang' and 'dir' attributes, and the HTML also lacks the <meta charset...> tag. These should be added so that the 404 message is well-formed and shown correctly in RTL wikis.

This is no longer the case on the Beta Cluster, e.g. on https://en.m.wikipedia.beta.wmflabs.org/wiki/Special:Contributions/banana the html tag has lang and dir attributes and the <meta charset="utf-8"> tag is present in the head section of the document.

This'll be deployed to group2 wikis on Monday, 26th June.

phuedx set the point value for this task to 2.Jun 23 2017, 1:16 PM

@Jdlrobson: This feels like a 2. What do you think?