{"action":"created","issue":{"url":"https://api.github.com/repos/mblaschke/TYPO3-metaseo/issues/70","labels_url":"https://api.github.com/repos/mblaschke/TYPO3-metaseo/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/mblaschke/TYPO3-metaseo/issues/70/comments","events_url":"https://api.github.com/repos/mblaschke/TYPO3-metaseo/issues/70/events","html_url":"https://github.com/mblaschke/TYPO3-metaseo/issues/70","id":90092920,"number":70,"title":"Doctype heuristics for custom doctype","user":{"login":"thomaszbz","id":11200727,"avatar_url":"https://avatars.githubusercontent.com/u/11200727?v=3","gravatar_id":"","url":"https://api.github.com/users/thomaszbz","html_url":"https://github.com/thomaszbz","followers_url":"https://api.github.com/users/thomaszbz/followers","following_url":"https://api.github.com/users/thomaszbz/following{/other_user}","gists_url":"https://api.github.com/users/thomaszbz/gists{/gist_id}","starred_url":"https://api.github.com/users/thomaszbz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomaszbz/subscriptions","organizations_url":"https://api.github.com/users/thomaszbz/orgs","repos_url":"https://api.github.com/users/thomaszbz/repos","events_url":"https://api.github.com/users/thomaszbz/events{/privacy}","received_events_url":"https://api.github.com/users/thomaszbz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mblaschke/TYPO3-metaseo/labels/need:%20feedback","name":"need: feedback","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-22T13:04:55Z","updated_at":"2015-06-28T04:07:38Z","closed_at":null,"body":"I did not test it yet, but I think that Typo3 CMS is allowing to set custom doctypes instead of constants which Typo3 CMS understands e.g.\r\n\r\n    <!DOCTYPE html plus something stupid>\r\n\r\ninstead of\r\n\r\n    html5\r\n\r\nTypo3 reference says\r\n\r\n    If set, then a document type declaration (and an XML prologue) will be generated.\r\n    The value can either be A COMPLETE DOCTYPE or one of the following keywords:\r\n    xhtml_trans for the XHTML 1.0 Transitional doctype.\r\n    xhtml_frames for the XHTML 1.0 Frameset doctype.\r\n    xhtml_strict for the XHTML 1.0 Strict doctype.\r\n    xhtml_basic for the XHTML basic doctype.\r\n    xhtml_11 for the XHTML 1.1 doctype.\r\n    xhtml+rdfa_10 for the XHTML+RDFa 1.0 doctype.\r\n    html5 for the HTML5 doctype.\r\n    none for no doctype at all.\r\n    \r\n    Note\r\n    \r\n    Keywords also change the way Typo3 generates some of the XHTML tags to ensure valid\r\n    XML. IF you set doctype to a string, then you MUST also set config.xhtmlDoctype (see below).\r\n\r\nBasically this means that IF a custom doctype string is set, the developer needs to precise which doctype was ment. It can be specified for XHTML in xhtmlDoctype:\r\n\r\n    xhtml_trans for XHTML 1.0 Transitional doctype.\r\n    xhtml_frames for XHTML 1.0 Frameset doctype.\r\n    xhtml_strict for XHTML 1.0 Strict doctype.\r\n    xhtml_basic for XHTML basic doctype.\r\n    xhtml_11 for XHTML 1.1 doctype.\r\n\r\nHowever, html5 is not listed here (and it's also not XHTML). But now, there's also XHTML5 in the W3C Recommendation:\r\n\r\n    This specification defines version 5.0 of the XHTML syntax, known as \"XHTML 5\".\r\n\r\nI can't find a way the developer can specify HTML5 usage when he sets a custom doctype string. It's really ugly misuse of config variables. The custom doctype string could be defined in a separate variable, e.g. \"customDoctypeString\". I think the variable config.xhtmlDoctype is totally obsolete because all its constants are already defined for config.doctype. It's nothing else than a workaround for bad design.\r\n\r\nBasically, what we need to be aware of is that custom doctypes are not properly supported, neither by Typo3 CMS nor by metaseo. Maybe we should file a bug report to Typo3 CMS Core. Otherwise it remains in the next LTS for another ~3 years. What do you think?\r\n\r\nOld versions of Typo3 CMS also allowed the keyword\r\n\r\n    html_5\r\n\r\nwhich is deprecated since 4.5 and removed in 4.7.\r\n\r\nBtw. I wonder why they did not use PHP constants for all the doctype keywords. We could easily adopt them in an extension like metaseo and be up-to-date whenever they change the keyword.\r\n\r\nhttp://www.lake-studio.de/typo3/typo3-4-7-x-html5-doctype\r\nhttps://forge.typo3.org/issues/25944\r\nhttp://docs.typo3.org/typo3cms/TyposcriptReference/Setup/Config/Index.html#doctype\r\nhttps://gutschik.com/gitlab/gutschik/typo3/commit/ba0989405e0cc1424cd672a8feb3c4fcb3601ba7.patch\r\nhttp://www.w3.org/TR/html5/introduction.html#html-vs-xhtml"},"comment":{"url":"https://api.github.com/repos/mblaschke/TYPO3-metaseo/issues/comments/116190747","html_url":"https://github.com/mblaschke/TYPO3-metaseo/issues/70#issuecomment-116190747","issue_url":"https://api.github.com/repos/mblaschke/TYPO3-metaseo/issues/70","id":116190747,"user":{"login":"thomaszbz","id":11200727,"avatar_url":"https://avatars.githubusercontent.com/u/11200727?v=3","gravatar_id":"","url":"https://api.github.com/users/thomaszbz","html_url":"https://github.com/thomaszbz","followers_url":"https://api.github.com/users/thomaszbz/followers","following_url":"https://api.github.com/users/thomaszbz/following{/other_user}","gists_url":"https://api.github.com/users/thomaszbz/gists{/gist_id}","starred_url":"https://api.github.com/users/thomaszbz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomaszbz/subscriptions","organizations_url":"https://api.github.com/users/thomaszbz/orgs","repos_url":"https://api.github.com/users/thomaszbz/repos","events_url":"https://api.github.com/users/thomaszbz/events{/privacy}","received_events_url":"https://api.github.com/users/thomaszbz/received_events","type":"User","site_admin":false},"created_at":"2015-06-28T04:07:38Z","updated_at":"2015-06-28T04:07:38Z","body":"Yes, should be better now. Still, I think that the custom doctype string is config variable misuse in the TYPO3 core, but for instance we can't improve that. Would be ways easier if the user could specify a doctype constant in config.doctype and specify a custom doctype string somewhere else.\r\n\r\nIssue can be closed. We'll need to look at that again as soon as XHTML5 is supported officially. As far as I see it has just very low priority so far."}}