[TASK] Deprecate TypoScript option config.mainScript 03/50603/4
authorBenni Mack <benni@typo3.org>
Sat, 12 Nov 2016 12:18:22 +0000 (13:18 +0100)
committerMarkus Klein <markus.klein@typo3.org>
Sun, 13 Nov 2016 16:37:41 +0000 (17:37 +0100)
The TypoScript option config.mainScript allows to set the frontend
entrypoint from "index.php" to something else.

As this has some bigger conceptual flaws (e.g. if this option is
set, backend preview will not work, as the backend preview does not
know about the selected TypoScript in the frontend), the option
is removed in favor of creating custom extensions to e.g. hook
into the frontend rendering to replace index.php.

Resolves: #78668
Releases: master
Change-Id: Idecdbc93fba33d9b8fecfa39c064fbeea4986a8d
Reviewed-on: https://review.typo3.org/50603
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Frederic Gaus <frederic.gaus@flagbit.de>
Tested-by: Frederic Gaus <frederic.gaus@flagbit.de>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/core/Documentation/Changelog/master/Deprecation-78668-TypoScriptOptionConfigmainScript.rst [new file with mode: 0644]

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-78668-TypoScriptOptionConfigmainScript.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-78668-TypoScriptOptionConfigmainScript.rst
new file mode 100644 (file)
index 0000000..18825ad
--- /dev/null
@@ -0,0 +1,28 @@
+.. include:: ../../Includes.txt
+Deprecation: #78668 - TypoScript option config.mainScript
+See :issue:`78668`
+The TypoScript option `config.mainScript` allows to set the frontend entrypoint from "index.php" to something else, and is respected
+when links are built, but not when e.g. previewing a page from the backend. This option has been deprecated.
+Setting this TypoScript option will trigger a deprecation log entry in the admin panel.
+Affected Installations
+Any installation using this TypoScript option.
+.. index:: TypoScript
index d4b1585..7dc5094 100644 (file)
@@ -2583,6 +2583,9 @@ class TypoScriptFrontendController
                     // Processing for the config_array:
                     $this->config['rootLine'] = $this->tmpl->rootLine;
                     $this->config['mainScript'] = trim($this->config['config']['mainScript']) ?: 'index.php';
+                    if (isset($this->config['config']['mainScript']) || $this->config['mainScript'] !== 'index.php') {
+                        $this->logDeprecatedTyposcript('config.mainScript', 'Setting the frontend script to something else than index.php is deprecated as of TYPO3 v8, and will not be possible in TYPO3 v9 without a custom extension');
+                    }
                     // Class for render Header and Footer parts
                     if ($this->pSetup['pageHeaderFooterTemplateFile']) {
                         $file = $this->tmpl->getFileName($this->pSetup['pageHeaderFooterTemplateFile']);