[TASK] Add fallback for EXT:cms label references 51/41051/11
authorMarkus Klein <markus.klein@typo3.org>
Thu, 9 Jul 2015 15:23:46 +0000 (17:23 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 10 Jul 2015 13:26:35 +0000 (15:26 +0200)
Make the ext:cms removal non-breaking by installing a fallback for the
label references.

Additionally remove the leftover reference to EXT:cms from the root
composer.json and replace a reference to a no longer existing path in
tsref.xml.

Resolves: #68017
Releases: master
Change-Id: Iae6a66814adce5849cef577f036010c5323d8f2f
Reviewed-on: http://review.typo3.org/41051
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
composer.json
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Documentation/Changelog/master/Breaking-67991-RemoveExtCms.rst [deleted file]
typo3/sysext/core/Documentation/Changelog/master/Deprecation-67991-RemovedExtCms.rst [new file with mode: 0644]
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/t3editor/res/tsref/tsref.xml

index 792c5f0..9bc716f 100644 (file)
@@ -66,7 +66,6 @@
                "typo3/cms-backend": "self.version",
                "typo3/cms-belog": "self.version",
                "typo3/cms-beuser": "self.version",
-               "typo3/cms-cms": "self.version",
                "typo3/cms-context-help": "self.version",
                "typo3/cms-core": "self.version",
                "typo3/cms-cshmanual": "self.version",
index 8eaa2c0..42a2f56 100755 (executable)
@@ -3977,6 +3977,24 @@ Connection: close
         * @return array Value of $LOCAL_LANG found in the included file. If that array is found it will returned.
         */
        static public function readLLfile($fileRef, $langKey, $charset = '', $errorMode = 0) {
+               // @deprecated since CMS 7, will be removed with CMS 8
+               // this is a fallback to convert references to old 'cms' locallang files to the new location
+               if (strpos($fileRef, 'EXT:cms') === 0) {
+                       $mapping = [
+                               'cms/web_info/loallang.xlf' => 'frontend/Resources/Private/Language/locallang_webinfo.xlf',
+                               'cms/locallang_ttc.xlf' => 'frontend/Resources/Private/Language/locallang_ttc.xlf',
+                               'cms/locallang_tca.xlf' => 'frontend/Resources/Private/Language/locallang_tca.xlf',
+                               'cms/layout/locallang_db_new_content_el.xlf' => 'backend/Resources/Private/Language/locallang_db_new_content_el.xlf',
+                               'cms/layout/locallang.xlf' => 'backend/Resources/Private/Language/locallang_layout.xlf',
+                               'cms/layout/locallang_mod.xlf' => 'backend/Resources/Private/Language/locallang_mod.xlf',
+                               'cms/locallang_csh_webinfo.xlf' => 'frontend/Resources/Private/Language/locallang_csh_webinfo.xlf',
+                               'cms/locallang_csh_weblayout.xlf' => 'frontend/Resources/Private/Language/locallang_csh_weblayout.xlf',
+                       ];
+                       $filePath = substr($fileRef, 4);
+                       self::deprecationLog('There is a reference to "' . $fileRef . '", which has been moved to "EXT:' . $mapping[$filePath] . '". This fallback will be removed with CMS 8.');
+                       $fileRef = 'EXT:' . $mapping[$filePath];
+               }
+
                /** @var $languageFactory \TYPO3\CMS\Core\Localization\LocalizationFactory */
                $languageFactory = self::makeInstance(\TYPO3\CMS\Core\Localization\LocalizationFactory::class);
                return $languageFactory->getParsedData($fileRef, $langKey, $charset, $errorMode);
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-67991-RemoveExtCms.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-67991-RemoveExtCms.rst
deleted file mode 100644 (file)
index 7e01709..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-=================================
-Breaking: #67991 - Remove ext:cms
-=================================
-
-Description
-===========
-
-Extension ``cms`` was removed. Most functionality have been moved to extension ``frontend`` with version 6.0 already.
-The rest of the files have now been moved to other extensions, extension ``cms`` does not exist anymore.
-
-
-Impact
-======
-
-Language files from EXT:cms are moved to different places into the core. 3rd party extensions using one of the moved
-files doesn't show any translation anymore.
-
-Third party extensions that define a dependency to extension ``cms`` will get their dependency rewritten to ``core``
-on the fly during extension installation as a compatibility layer.
-
-
-Affected Installations
-======================
-
-All 3rd party extensions that uses language labels from extension ``cms`` or define a dependenty to extension ``cms``
-in ``ext_emconf.php``.
-
-
-Migration
-=========
-
-Update the dependency constraint in ``ext_emconf.php`` of the affected extension. A typical substitution is
-a dependency to extension ``frontend``.
-
-Move the following references to the new location of the language file:
-
-* typo3/sysext/cms/web_info/locallang.xlf -> typo3/sysext/frontend/Resources/Private/Language/locallang_webinfo.xlf
-* typo3/sysext/cms/locallang_ttc.xlf -> typo3/sysext/frontend/Resources/Private/Language/locallang_ttc.xlf
-* typo3/sysext/cms/locallang_tca.xlf -> typo3/sysext/frontend/Resources/Private/Language/locallang_tca.xlf
-* typo3/sysext/cms/layout/locallang_db_new_content_el.xlf -> typo3/sysext/backend/Resources/Private/Language/locallang_db_new_content_el.xlf
-* typo3/sysext/cms/layout/locallang.xlf -> typo3/sysext/backend/Resources/Private/Language/locallang_layout.xlf
-* typo3/sysext/cms/layout/locallang_mod.xlf -> typo3/sysext/backend/Resources/Private/Language/locallang_mod.xlf
-* typo3/sysext/cms/locallang_csh_webinfo.xlf -> typo3/sysext/frontend/Resources/Private/Language/locallang_csh_webinfo.xlf
-* typo3/sysext/cms/locallang_csh_weblayout.xlf -> typo3/sysext/frontend/Resources/Private/Language/locallang_csh_weblayout.xlf
\ No newline at end of file
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-67991-RemovedExtCms.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-67991-RemovedExtCms.rst
new file mode 100644 (file)
index 0000000..d326558
--- /dev/null
@@ -0,0 +1,44 @@
+=====================================
+Deprecation: #67991 - Removed ext:cms
+=====================================
+
+Description
+===========
+
+Extension ``cms`` was removed. Most functionality has been moved to extension ``frontend`` with version 6.0 already.
+The rest of the files have now been moved to other extensions, extension ``cms`` does not exist anymore.
+
+
+Impact
+======
+
+Language files from EXT:cms are moved to different places into the core. ``LLL:EXT:cms/...`` references are
+rewritten dynamically to the new file locations, but this fallback layer is subject to be removed with CMS 8.
+
+Third party extensions that define a dependency to extension ``cms`` will get their dependency rewritten to ``core``
+on the fly during extension installation as a compatibility layer.
+
+
+Affected Installations
+======================
+
+All 3rd party extensions using language labels from extension ``cms`` or defining a dependency to extension ``cms``
+in ``ext_emconf.php``.
+
+
+Migration
+=========
+
+Update the dependency constraint in ``ext_emconf.php`` of the affected extension. A typical substitution is
+a dependency to extension ``frontend``.
+
+Move the following references to the new location of the language file:
+
+* typo3/sysext/cms/web_info/locallang.xlf -> typo3/sysext/frontend/Resources/Private/Language/locallang_webinfo.xlf
+* typo3/sysext/cms/locallang_ttc.xlf -> typo3/sysext/frontend/Resources/Private/Language/locallang_ttc.xlf
+* typo3/sysext/cms/locallang_tca.xlf -> typo3/sysext/frontend/Resources/Private/Language/locallang_tca.xlf
+* typo3/sysext/cms/layout/locallang_db_new_content_el.xlf -> typo3/sysext/backend/Resources/Private/Language/locallang_db_new_content_el.xlf
+* typo3/sysext/cms/layout/locallang.xlf -> typo3/sysext/backend/Resources/Private/Language/locallang_layout.xlf
+* typo3/sysext/cms/layout/locallang_mod.xlf -> typo3/sysext/backend/Resources/Private/Language/locallang_mod.xlf
+* typo3/sysext/cms/locallang_csh_webinfo.xlf -> typo3/sysext/frontend/Resources/Private/Language/locallang_csh_webinfo.xlf
+* typo3/sysext/cms/locallang_csh_weblayout.xlf -> typo3/sysext/frontend/Resources/Private/Language/locallang_csh_weblayout.xlf
\ No newline at end of file
index 0e50347..61140cc 100644 (file)
@@ -3310,7 +3310,7 @@ class TypoScriptFrontendController {
 
        /**
         * Determines to include custom or pagegen.php script
-        * returns script-filename if a TypoScript (config) script is defined and should be include instead of pagegen.php
+        * returns script-filename if a TypoScript (config) script is defined and should be included instead of pagegen.php
         *
         * @return string The relative filepath of "config.pageGenScript" if found and allowed
         */
index fa34eea..92b7c49 100644 (file)
@@ -656,14 +656,14 @@ If this property is set, images are not allowed to be scaled up in size. This pa
                </property>
                <property name="pageGenScript" type="string">
                        <description><![CDATA[Alternative page generation script for applications using index_ts.php for initialization, caching, stating and so on. This script is included in the global scope of index_ts.php-script and thus you may include libraries here. Always use include_once for libraries.
-Remember not to output anything from such an included script. All content must be set into $TSFE->content. Take a look at typo3/sysext/cms/tslib/pagegen.php
+Remember not to output anything from such an included script. All content must be set into $TSFE->content. Take a look at \TYPO3\CMS\Frontend\Page\PageGenerator
 
 NOTE: This option is ignored if
 
 $TYPO3_CONF_VARS["FE"]["noPHPscriptInclude"]=1;
 
 is set in localconf.php.]]></description>
-                       <default><![CDATA[typo3/sysext/cms/tslib/pagegen.php]]></default>
+                       <default><![CDATA[typo3/sysext/frontend/Classes/Page/PageGenerator.php]]></default>
                </property>
                <property name="pageRendererTemplateFile" type="string">
                        <description><![CDATA[