Merlijn van Deen has submitted this change and it was merged. Change subject: Add proper HTML structure to error pages ......................................................................
Add proper HTML structure to error pages Add doctype, header and body sections to error pages. Bug: T119830 Change-Id: I8aabf4a8ee02690ef71be56b86ebca96754a088d --- M www/content/403.php M www/content/404.php M www/content/500.php M www/content/503.php 4 files changed, 42 insertions(+), 4 deletions(-) Approvals: Merlijn van Deen: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/www/content/403.php b/www/content/403.php index 5ba62f9..9977e82 100644 --- a/www/content/403.php +++ b/www/content/403.php @@ -1,3 +1,11 @@ +<!DOCTYPE html> +<html lang=en" dir="ltr"> +<head> +<meta charset="UTF-8"> +<title>403 Forbidden</title> +<meta name="viewport" content="initial-scale=1.0, user-scalable=yes, width=device-width"> +</head> +<body> <?php $uri = $_SERVER['HTTP_X_ORIGINAL_URI']; ?> <h1>Forbidden</h1> <p>The URI you have requested, <a href="<?= $uri ?>"><code><?= $uri ?></code></a>, might exist but the server has been instructed not to let you reach it.</p> @@ -40,3 +48,5 @@ <p>Perhaps the webserver has temporarily lost its mind, or the link you've followed doesn't actually lead somewhere useful?</p> <p>If you're pretty sure this shouldn't be an error, you may wish to notify the <a href="/?tool=admin">project administrators</a> about the error and how you ended up here.</p> <?php endif ?> +</body> +</html> diff --git a/www/content/404.php b/www/content/404.php index a98003d..b8f2693 100644 --- a/www/content/404.php +++ b/www/content/404.php @@ -1,6 +1,14 @@ +<!DOCTYPE html> +<html lang=en" dir="ltr"> +<head> +<meta charset="UTF-8"> +<title>404 Not Found</title> +<meta name="viewport" content="initial-scale=1.0, user-scalable=yes, width=device-width"> +</head> +<body> <?php $uri = $_SERVER['HTTP_X_ORIGINAL_URI']; ?> - <h1>Four hundred and four!</h2> - <p>The URI you have requested, <code><?= $uri ?></code>, doesn't seem to actually exist.</p> + <h1>Four hundred and four!</h1> + <p>The URI you have requested, <code><?= htmlspecialchars( $uri ) ?></code>, doesn't seem to actually exist.</p> <?php $tool = ''; if(preg_match("@^/([^/]+)/@", $uri, $part)) { $gr = posix_getgrnam("tools.".$part[1]); @@ -38,5 +46,5 @@ <p>Perhaps the webserver has temporarily lost its mind, or the link you've followed doesn't actually lead somewhere useful?</p> <p>You might want to looks at the <a href="/?list">list of tools</a> to find what you were looking for, or one of the links on the sidebar to the left. If you're pretty sure this shouldn't be an error, you may wish to notify the <a href="/?tool=admin">project administrators</a> about the error and how you ended up here.</p> <?php endif ?> - - +</body> +</html> diff --git a/www/content/500.php b/www/content/500.php index 92d334e..d985199 100644 --- a/www/content/500.php +++ b/www/content/500.php @@ -1,3 +1,11 @@ +<!DOCTYPE html> +<html lang=en" dir="ltr"> +<head> +<meta charset="UTF-8"> +<title>500 Internal Server Error</title> +<meta name="viewport" content="initial-scale=1.0, user-scalable=yes, width=device-width"> +</head> +<body> <?php $uri = $_SERVER['HTTP_X_ORIGINAL_URI']; ?> <h1>Internal error</h1> <p>The URI you have requested, <a href="<?= $uri ?>"><code><?= $uri ?></code></a>, @@ -45,3 +53,5 @@ somewhere useful?</p> <p>If you're pretty sure this shouldn't be an error, you may wish to notify the <a href="/?tool=admin">project administrators</a> about the error and how you ended up here.</p> <?php endif ?> +</body> +</html> diff --git a/www/content/503.php b/www/content/503.php index 62621da..a2ad497 100644 --- a/www/content/503.php +++ b/www/content/503.php @@ -1,3 +1,11 @@ +<!DOCTYPE html> +<html lang=en" dir="ltr"> +<head> +<meta charset="UTF-8"> +<title>503 Service Unavailable</title> +<meta name="viewport" content="initial-scale=1.0, user-scalable=yes, width=device-width"> +</head> +<body> <?php $uri = $_SERVER['HTTP_X_ORIGINAL_URI']; ?> <h1>No webservice</h1> <p>The URI you have requested, <a href="<?= $uri ?>"><code><?= $uri ?></code></a>, @@ -44,3 +52,5 @@ <p>This URI is not currently part of any tool.</p> <p>If you're pretty sure this shouldn't be an error, you may wish to notify the <a href="/?tool=admin">project administrators</a> about the error and how you ended up here.</p> <?php endif ?> +</body> +</html> -- To view, visit https://gerrit.wikimedia.org/r/266075 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8aabf4a8ee02690ef71be56b86ebca96754a088d Gerrit-PatchSet: 1 Gerrit-Project: labs/toollabs Gerrit-Branch: master Gerrit-Owner: BryanDavis <bda...@wikimedia.org> Gerrit-Reviewer: Merlijn van Deen <valhall...@arctus.nl> Gerrit-Reviewer: Yuvipanda <yuvipa...@wikimedia.org> Gerrit-Reviewer: coren <mpellet...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits