[!!!][TASK] Remove config.htmlTag TypoScript properties 03/61003/3
authorBenni Mack <benni@typo3.org>
Thu, 13 Jun 2019 13:37:43 +0000 (15:37 +0200)
committerBenni Mack <benni@typo3.org>
Thu, 13 Jun 2019 14:31:55 +0000 (16:31 +0200)
The two TypoScript options

* config.htmlTag_langKey
* config.htmlTag_dir

have been removed, as they have no effect anymore in TYPO3 v10,
which only works with Site Handling.

Site Handlings "direction" and "twoLetterIsoCode" are already
in place and used when Site Handling is active.

Resolves: #88560
Releases: master
Change-Id: I8ef2a8b8ccd9c790fd7db940e908e8a362ec4ca3
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61003
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Documentation/Changelog/master/Breaking-87193-DeprecatedFunctionalityRemoved.rst
typo3/sysext/frontend/Classes/Http/RequestHandler.php
typo3/sysext/t3editor/Resources/Private/tsref.xml
typo3/sysext/t3editor/Resources/Public/JavaScript/Mode/typoscript/typoscript.js

index 4b3ae8b..de57b95 100644 (file)
@@ -1245,6 +1245,8 @@ The following TypoScript options have been dropped:
 
 * `config.concatenateJsAndCss`
 * `config.defaultGetVars`
+* `config.htmlTag_langKey`
+* `config.htmlTag_dir`
 * `config.language`
 * `config.language_alt`
 * `config.locale_all`
index 632f33e..f7052a8 100644 (file)
@@ -216,15 +216,10 @@ class RequestHandler implements RequestHandlerInterface
         // Reset the content variables:
         $controller->content = '';
         $htmlTagAttributes = [];
-        $htmlLang = $controller->config['config']['htmlTag_langKey'] ?? ($controller->sys_language_isocode ?: 'en');
-        $direction = $controller->config['config']['htmlTag_dir'] ?? null;
-        if ($siteLanguage !== null) {
-            $direction = $siteLanguage->getDirection();
-            $htmlLang = $siteLanguage->getTwoLetterIsoCode();
-        }
+        $htmlLang = $siteLanguage && $siteLanguage->getTwoLetterIsoCode() ? $siteLanguage->getTwoLetterIsoCode() : '';
 
-        if ($direction) {
-            $htmlTagAttributes['dir'] = htmlspecialchars($direction);
+        if ($siteLanguage && $siteLanguage->getDirection()) {
+            $htmlTagAttributes['dir'] = htmlspecialchars($siteLanguage->getDirection());
         }
         // Setting document type:
         $docTypeParts = [];
@@ -300,11 +295,13 @@ class RequestHandler implements RequestHandlerInterface
                 $pageRenderer->setMetaCharsetTag('<meta charset="|">');
             }
         }
-        if ($controller->xhtmlVersion) {
-            $htmlTagAttributes['xml:lang'] = $htmlLang;
-        }
-        if ($controller->xhtmlVersion < 110 || $doctype === 'html5') {
-            $htmlTagAttributes['lang'] = $htmlLang;
+        if ($htmlLang) {
+            if ($controller->xhtmlVersion) {
+                $htmlTagAttributes['xml:lang'] = $htmlLang;
+            }
+            if ($controller->xhtmlVersion < 110 || $doctype === 'html5') {
+                $htmlTagAttributes['lang'] = $htmlLang;
+            }
         }
         if ($controller->xhtmlVersion || $doctype === 'html5' && $xmlDocument) {
             // We add this to HTML5 to achieve a slightly better backwards compatibility
index b6bfca2..22ddd3c 100644 (file)
@@ -332,7 +332,7 @@ Use this feature in templates supplying other content-types than HTML. That coul
 
 Note that the keywords also change the way TYPO3 generates some of the XHTML tags to ensure valid XML. If you set doctype to a string, then you must also set config.xhtmlDoctype (see below).
 
-See "config.htmlTag_setParams" and "config.htmlTag_langKey" for more details on the effect on the html tag.
+See "config.htmlTag_setParams" for more details on the effect on the html tag.
 ]]></description>
                        <default><![CDATA[Default is a DOCTYPE like this:
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
@@ -384,29 +384,6 @@ Useful if you run a template with special content at - say &type=95 - but still
                        <default><![CDATA[
 ]]></default>
                </property>
-               <property name="htmlTag_dir" type="string">
-                       <description><![CDATA[Sets text direction for whole document (useful for display of Arabic, Hebrew pages).
-
-Basically the value becomes the attribute value of "dir" for the <html> tag.
-
-Values:
-rtl = Right-To-Left (for Arabic / Hebrew)
-ltr = Left-To-Right (Default for other languages)
-
-Example:
-config.htmlTag_dir = rtl]]></description>
-                       <default><![CDATA[
-]]></default>
-               </property>
-               <property name="htmlTag_langKey" type="string">
-                       <description><![CDATA[Allows you to set the language value for the attributes "xml:lang" and "lang" in the <html> tag (when using "config.doctype = xhtml*").
-
-The values must follow the format specified in IETF RFC 3066
-
-Example:
-config.htmlTag_langKey = en-US]]></description>
-                       <default><![CDATA[en]]></default>
-               </property>
                <property name="htmlTag_setParams" type="string">
                        <description><![CDATA[Sets the attributes for the <html> tag on the page. If you set "config.doctype" to a keyword enabling XHTML then some attributes are already set. This property allows you to override any preset attributes with you own content if needed.
 
index 9f0dab2..b42f1e5 100644 (file)
         'HTMLparser': kw('HTMLparser'),
         'HTMLparser_tags': kw('HTMLparser_tags'),
         'htmlSpecialChars': kw('htmlSpecialChars'),
-        'htmlTag_dir': kw('htmlTag_dir'),
-        'htmlTag_langKey': kw('htmlTag_langKey'),
         'htmlTag_setParams': kw('htmlTag_setParams'),
         'http': kw('http'),
         'icon': kw('icon'),