[BUGFIX] EXT:form - check for compatibility6 if old mailform is used 72/43472/4
authorRalf Zimmermann <ralf.zimmermann@tritum.de>
Tue, 22 Sep 2015 12:48:05 +0000 (14:48 +0200)
committerNicole Cordes <typo3@cordes.co>
Sat, 26 Sep 2015 17:17:42 +0000 (19:17 +0200)
Check if compatibility6 is loaded if typoscript
"useDefaultContentObject" is set.

Resolves: #69195
Releases: master
Change-Id: Ie1ae530260d6057904a7ed4be2daf573cb358bd0
Reviewed-on: http://review.typo3.org/43472
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Tested-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
typo3/sysext/form/Classes/Hooks/ContentObjectHook.php

index 6b0a355..8a18b88 100644 (file)
@@ -19,9 +19,10 @@ use TYPO3\CMS\Core\Utility\ArrayUtility;
 use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
 use TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser;
 use TYPO3\CMS\Form\Domain\Model\Configuration;
+use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 
 /**
- * The form wizard controller
+ * Hook cObjGetSingleExt
  */
 class ContentObjectHook {
 
@@ -42,7 +43,11 @@ class ContentObjectHook {
         */
        public function cObjGetSingleExt($typoScriptObjectName, array $typoScript, $typoScriptKey, ContentObjectRenderer $contentObject) {
                $content = '';
-               if ($typoScriptObjectName === 'FORM' && !empty($typoScript['useDefaultContentObject'])) {
+               if (
+                       $typoScriptObjectName === 'FORM'
+                       && !empty($typoScript['useDefaultContentObject'])
+                       && ExtensionManagementUtility::isLoaded('compatibility6')
+               ) {
                        $content = $contentObject->getContentObject($typoScriptObjectName)->render($typoScript);
                } elseif ($typoScriptObjectName === 'FORM') {
                        $mergedTypoScript = NULL;