[TASK] Deprecate frameset and frame 57/50157/5
authorDaniel Windloff <daniel.jc.windloff@googlemail.com>
Mon, 10 Oct 2016 10:33:40 +0000 (12:33 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 27 Oct 2016 13:40:33 +0000 (15:40 +0200)
HTML5 does not support frame and frameset anymore.
Deprecate TypoScript that can be used to create a
markup based on frameset.

Resolves: #78217
Releases: master
Change-Id: Iddf987c839ae0db335260878f89e1b2dc754c575
Reviewed-on: https://review.typo3.org/50157
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Documentation/Changelog/master/Deprecation-78217-FramesetAndFrame.rst [new file with mode: 0644]
typo3/sysext/frontend/Classes/Page/FramesetRenderer.php
typo3/sysext/frontend/Classes/Page/PageGenerator.php

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-78217-FramesetAndFrame.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-78217-FramesetAndFrame.rst
new file mode 100644 (file)
index 0000000..732bd33
--- /dev/null
@@ -0,0 +1,51 @@
+.. include:: ../../Includes.txt
+
+==================================================
+Deprecation: #78217 - frameset and frame
+==================================================
+
+See :issue:`78217`
+
+Description
+===========
+
+Frameset and frame are not supported in HTML5_ anymore.
+The browser support for framesets could be dropped in the future.
+
+Creating a layout based on framesets has been marked deprecated:
+* DocumentationFrame_
+* DocumentationFrameset_
+
+The following TypoScript has been marked as deprecated:
+* :ts:`config.frameReloadIfNotInFrameset`
+* :ts:`config.doctype = xhtml_frames`
+* :ts:`config.xhtmlDoctype= xhtml_frames`
+* :ts:`frameSet` and its options
+* :ts:`FRAME` and its options
+* :ts:`FRAMESET` and its options
+
+Furthermore the class :php:`FramesetRenderer` has been marked as deprecated.
+
+.. _HTML5: https://www.w3.org/TR/html5/obsolete.html#frames
+.. _DocumentationFrame: https://docs.typo3.org/typo3cms/TyposcriptReference/Setup/Frame/Index.html
+.. _DocumentationFrameset: https://docs.typo3.org/typo3cms/TyposcriptReference/Setup/Frameset/Index.html
+
+
+Impact
+======
+
+Using framesets will trigger deprecation log entries.
+
+
+Affected Installations
+======================
+
+All installations using framesets.
+
+
+Migration
+=========
+
+None.
+
+.. index:: Frontend, TypoScript
index 8775c2a..3e57103 100644 (file)
@@ -19,6 +19,8 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
  * Rendering of framesets
+ *
+ * @deprecated since TYPO3 v8, will be removed in TYPO3 v9
  */
 class FramesetRenderer
 {
index bfb121d..2dc32ad 100644 (file)
@@ -95,6 +95,10 @@ class PageGenerator
             $tsfe->absRefPrefix = '';
         }
         if ($tsfe->type && $tsfe->config['config']['frameReloadIfNotInFrameset']) {
+            \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
+                'frameReloadIfNotInFrameset has been marked as deprecated since TYPO3 v8, ' .
+                'and will be removed in TYPO3 v9.'
+            );
             $tdlLD = $tsfe->tmpl->linkData($tsfe->page, '_top', $tsfe->no_cache, '');
             $tsfe->additionalJavaScript['JSCode'] .= 'if(!parent.' . trim($tsfe->sPre) . ' && !parent.view_frame) top.location.href="' . $tsfe->baseUrlWrap($tdlLD['totalURL']) . '"';
         }
@@ -139,8 +143,13 @@ class PageGenerator
                 case 'xhtml_trans':
 
                 case 'xhtml_strict':
-
+                    $tsfe->xhtmlVersion = 100;
+                    break;
                 case 'xhtml_frames':
+                    \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
+                        'xhtmlDoctype = xhtml_frames  and doctype = xhtml_frames have been marked as deprecated since TYPO3 v8, ' .
+                        'and will be removed in TYPO3 v9.'
+                    );
                     $tsfe->xhtmlVersion = 100;
                     break;
                 case 'xhtml_basic':
@@ -866,6 +875,10 @@ class PageGenerator
         }
         // Header complete, now add content
         if ($tsfe->pSetup['frameSet.']) {
+            \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
+                'frameSet, FRAME and FRAMESET have been marked as deprecated since TYPO3 v8 ' .
+                'and will be removed in TYPO3 v9.'
+            );
             $fs = GeneralUtility::makeInstance(FramesetRenderer::class);
             $pageRenderer->addBodyContent($fs->make($tsfe->pSetup['frameSet.']));
             $pageRenderer->addBodyContent(LF . '<noframes>' . LF);