[BUGFIX] Frontend Login not added to CSC anymore 33/27233/2
authorBenjamin Mack <benni@typo3.org>
Sat, 1 Feb 2014 15:02:03 +0000 (16:02 +0100)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Tue, 4 Feb 2014 01:33:12 +0000 (02:33 +0100)
As felogin has no dependency for CSS Styled Content
it registers itself via
ExtensionManagementUtility::addTypoScript()
and does not hook in after css_styled_content, because
CSS styled content itself hasn't been initialized at that
time. Thus, felogin needs to have a dependency on
css_styled_content in order to still work as before.

Additionally, some unnecessary TypoScript code
was removed / cleaned up at the same time.

How to reproduce:
Add a login CE and you'll get a yellow error
message. Apply the patch, and the form will
show up (you need to uninstall / install an
extension first in order to have the dependecy
resolving take place).

Releases: 6.2
Resolves: #55557
Change-Id: I81e590038c10e793538419523ba37d3b29700b48
Reviewed-on: https://review.typo3.org/27233
Reviewed-by: Christian Kuhn
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
typo3/sysext/felogin/composer.json
typo3/sysext/felogin/ext_emconf.php
typo3/sysext/felogin/ext_localconf.php

index 136810d..b2ed43a 100644 (file)
@@ -7,7 +7,8 @@
        "version": "6.2.0",
 
        "require": {
-               "typo3/cms/core": "*"
+               "typo3/cms/core": "*",
+               "typo3/cms/css-styled-content": "*"
        },
        "replace": {
                "felogin": "*"
index 0e4c582..d5a09fb 100644 (file)
@@ -31,6 +31,7 @@ $EM_CONF[$_EXTKEY] = array(
        'constraints' => array(
                'depends' => array(
                        'typo3' => '6.2.0-6.2.99',
+                       'css_styled_content' => '6.2.0-6.2.99'
                ),
                'conflicts' => array(),
                'suggests' => array()
index 2cf371e..bbb68e9 100644 (file)
@@ -2,18 +2,17 @@
 if (!defined('TYPO3_MODE')) {
        die('Access denied.');
 }
-//replace old Login
-$pluginContent = trim('
+
+// define the plugin execution
+$pluginContent = '# Defining "felogin" plugin TypoScript
 plugin.tx_felogin_pi1 = USER_INT
-plugin.tx_felogin_pi1 {
-  includeLibs = EXT:felogin/pi1/class.tx_felogin_pi1.php
-  userFunc = tx_felogin_pi1->main
-}
-');
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY, 'setup', '
-# Setting ' . $_EXTKEY . ' plugin TypoScript
-' . $pluginContent);
-$addLine = '
+plugin.tx_felogin_pi1.userFunc = TYPO3\\CMS\\Felogin\\Controller\\FrontendLoginController->main
+';
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY, 'setup', $pluginContent);
+
+// replace old Login with felogin
+$replaceLoginCType = '
+# Setting "felogin" plugin to replace default "login" content element via TypoScript
 tt_content.login = COA
 tt_content.login {
        10 = < lib.stdheader
@@ -21,7 +20,8 @@ tt_content.login {
        20 = < plugin.tx_felogin_pi1
 }
 ';
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY, 'setup', '# Setting ' . $_EXTKEY . ' plugin TypoScript' . $addLine . '', 43);
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY, 'setup', $replaceLoginCType, 43);
+
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
 mod.wizards.newContentElement.wizardItems.forms {
        elements {
@@ -39,5 +39,4 @@ mod.wizards.newContentElement.wizardItems.forms {
 ');
 
 // Page module hook
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem'][$_EXTKEY] =
-       'EXT:' . $_EXTKEY . '/Classes/Hooks/CmsLayout.php:TYPO3\CMS\Felogin\Hooks\CmsLayout';
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem'][$_EXTKEY] = 'TYPO3\\CMS\\Felogin\\Hooks\\CmsLayout';