[BUGFIX] Re-add rst file and throw wizard script exception 35/41935/3
authorFrank Nägler <typo3@naegler.net>
Fri, 24 Jul 2015 15:49:14 +0000 (17:49 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 24 Jul 2015 17:05:00 +0000 (19:05 +0200)
This patch re-add 7.0/Breaking-59659-DeprecatedCodeRemovalInBackendSysext.rst
file and throws an exception in "script" registration to hint coders about
new handling of script registration.

Resolves: #68520
Releases: master
Change-Id: I75795496f8a4ce7cc346ff60ea6524065ac53bd3
Reviewed-on: http://review.typo3.org/41935
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/backend/Classes/Form/Element/AbstractFormElement.php
typo3/sysext/core/Documentation/Changelog/7.0/Breaking-59659-DeprecatedCodeRemovalInBackendSysext.rst [new file with mode: 0644]

index f473f50..ef7b97b 100644 (file)
@@ -110,7 +110,9 @@ abstract class AbstractFormElement extends AbstractNode {
         * @param string $itemName The field name
         * @param array $specConf Special configuration if available.
         * @param bool $RTE Whether the RTE could have been loaded.
+        *
         * @return string The new item value.
+        * @throws \InvalidArgumentException
         */
        protected function renderWizards($itemKinds, $wizConf, $table, $row, $field, $PA, $itemName, $specConf, $RTE = FALSE) {
                // Return not changed main item directly if wizards are disabled
@@ -150,6 +152,11 @@ abstract class AbstractFormElement extends AbstractNode {
                $buttonWizards = array();
                $otherWizards = array();
                foreach ($wizConf as $wizardIdentifier => $wizardConfiguration) {
+                       if (!isset($wizardConfiguration['module']['name']) && isset($wizardConfiguration['script'])) {
+                               throw new \InvalidArgumentException('The way registering a wizard in TCA has changed in 6.2 and was removed in CMS 7. '
+                                       . 'Please set module[name]=module_name instead of using script=path/to/sctipt.php in your TCA. ', 1437750231);
+                       }
+
                        // If an identifier starts with "_", this is a configuration option like _POSITION and not a wizard
                        if ($wizardIdentifier[0] === '_') {
                                continue;
diff --git a/typo3/sysext/core/Documentation/Changelog/7.0/Breaking-59659-DeprecatedCodeRemovalInBackendSysext.rst b/typo3/sysext/core/Documentation/Changelog/7.0/Breaking-59659-DeprecatedCodeRemovalInBackendSysext.rst
new file mode 100644 (file)
index 0000000..18054f6
--- /dev/null
@@ -0,0 +1,57 @@
+===============================================================
+Breaking: #59659 - Removal of deprecated code in sysext backend
+===============================================================
+
+Description
+===========
+
+Flexforms
+---------
+
+Flexform xml that still contains the old "<tx_templavoila><title>" code has to be adapted.
+The "<tx_templavoila>" elements needs to be removed.
+
+Wizard registration
+-------------------
+
+Wizard registration in TCA must not contain the "script=some/path/script.php" definition anymore.
+The new API for registering wizards is to set "module[name]=module_name".
+
+Removed PHP methods
+-------------------
+
+* ``AbstractRecordList::writeBottom()`` is removed without replacement. The functionality is not needed anymore.
+* ``SpriteGenerator::setOmmitSpriteNameInIconName()`` is removed in favor of ``setOmitSpriteNameInIconName()``
+* ``DocumentTemplate::isCMlayers()`` is removed without replacement. The functionality is obsolete.
+* ``DocumentTemplate::getFileheader()`` is removed. Use ``getResourceHeader()`` instead.
+* ``BackendUtility::displayWarningMessages()`` is removed without replacement. The functionality was moved to ext:aboutmodules.
+* ``IconUtility::getIconImage()`` is removed without replacement. Use sprite icon API instead.
+* ``PageLayoutView::getSelectedBackendLayoutUid()`` is removed. Use ``BackendLayoutView::getSelectedCombinedIdentifier()`` instead.
+* ``ClickMenu::menuItemsForClickMenu()`` is removed without replacement. The functionality is obsolete.
+
+Removed JS functions
+--------------------
+
+* ``showClickmenu_noajax()`` is removed. Use ``Clickmenu.ajax = false; showClickmenu_raw();`` instead.
+* ``setLayerObj()`` is replaced with ``Clickmenu.populateData()``.
+* ``hideEmpty()`` is replaced with ``Clickmenu.hideAll()``.
+* ``hideSpecific()`` is replaced with ``Clickmenu.hide()``. E.g. ``Clickmenu.hide('contentMenu1');``
+* ``showHideSelectorBoxes()`` is replaced with ``toggleSelectorBoxes()``.
+
+Impact
+======
+
+A call to any of the aforementioned methods by third party code will result in
+a fatal PHP error.
+
+
+Affected installations
+======================
+
+Any installation which contains third party code still using these deprecated methods.
+
+
+Migration
+=========
+
+Replace the calls with the suggestions outlined above.