Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
markup
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Feb 2012 at 10:23 UTC
Updated:
4 Jan 2014 at 01:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
gary4gar commentedhere is the silly Patch that changes the DOCTYPE to HTML5
Comment #2
Everett Zufelt commentedI question why it never had a doctype in the first place, and whether we should add one now.
Comment #3
gary4gar commentedEarlier doctype was xhtml & I have now switched it to html5. Besides, doctype is recommended for any HTML document to enforce standards mode.
Comment #4
nod_I don't see a doctype, unless it's added somewhere else that's quirksmode for you right there.
<!doctype html>would help.Comment #5
droplet commentedComment #6
gary4gar commentedMy Bad! here is the correct version :)
Comment #7
jacinePlease write it this way, so it's consistent with html.tpl.php:
<!DOCTYPE html>.Thanks!
Comment #8
webchickHey, I can do that! :P
Verified at http://validator.w3.org/check
Comment #9
jacineSweet :D Thanks!
Comment #11
webchickWhat the what? I am not sure how changing an HTML string causes the managed files table to not be found. :P Re-testing.
#8: html5-fast404.patch queued for re-testing.
Comment #12
webchickThere we go.
Re-RTBCing because it was RTBCed by Jacine in #9 before the random testbot freakout.
Comment #13
droplet commentedRecently, I found IE served default error page to users (http://www.404-error-page.com/404-error-page-too-short-problem-microsoft...)
so if our purpose is make it faster, I think we don't need to output any custom strings. 404 error header is good enough.
Comment #14
dries commentedCommitted to 8.x. Thanks.
Comment #16
droplet commentedAdd it back to D7
Comment #17
cweagansFixing tags per http://drupal.org/node/1517250
Comment #18
intergalactic overlords commentedTested on drupal 7 - works fine. I get following doctype:
Comment #19
webchickHm. I don't think we can backport this to D7. We can't change core's markup, or we risk breaking themes.
But thanks for uploading the patch; I'm sure someone out there will find it useful!
Comment #20
Tor Arne Thune commentedIt looks like the only change in the D7 version is the added doctype, which should have been there in the first place. Could this break existing themes in some way?
Comment #21
webchickYes, because existing themes are XHTML in D7.
Comment #22
andypostJust in case of changing to recommended defaults for HTML5, this could be useful to make a life a bit easy :)
Comment #23
David_Rothstein commentedThe issue title here is inaccurate for the patch in #16 that was originally posted for Drupal 7... That confused me a lot :)
Since #16 just fixes a missing doctype, it actually seems like it should be backportable to me. Correct me if I'm wrong, but I think this string of HTML is impossible to theme (as in, literally impossible because there is no CSS or styles added to the page)? If so, then we don't have to worry about that either.
Comment #24
David_Rothstein commentedOh, but first of all, wait. The Drupal 8 patch was actually incomplete, because there's still this left over in bootstrap.inc:
Comment #25
kid_icarus commentedSince #8 has already been committed, I think this should do the trick.
After the patch, this grep returns no results :)
Comment #26
David_Rothstein commentedHm, wait a second, is this missing an opening
<html>tag (after the doctype)? And same question goes for the original commit?Comment #27
kid_icarus commentedIndeed both patches are missing an opening
<html>tag.It struck me as odd, but since #8 was committed I reasoned that it was done intentionally and made a similar edit. I should have listened to my inner wtf. Here is a patch which addresses #26.
Comment #28
droplet commented#26, 27,
Nope. Although it may not a good habit,
<html>start tag can be omitted in HTML5.#27 patch looks good.
Comment #29
andypost+1 to RTBC
Comment #30
catchCommitted/pushed to 8.x.
I'm going to disagree with webchick in #19 - the fast 404 pages aren't themable at all (unless you hack the variable yourself), so this should be OK to backport.
Comment #31
pere orgaPatch attached.
Comment #32
barrapontoWe shouldn't change Drupal 7 markup to HTML5, should we? It should remain XHTML.
Comment #33
pere orgaOk.
Comment #34
barrapontoLooks good to me. W3C Validator warns that it doesn't declare its encoding, but it's not an error.
Comment #35
pere orgaThanks.
Yes. The same warning should appear on 8.x.
But even the '404' pages of validator.w3.org (such as http://validator.w3.org/notfound) don't specify the encoding.
Comment #36
David_Rothstein commentedLooks good - committed to 7.x. Thanks! http://drupalcode.org/project/drupal.git/commit/8a4df80