[BUGFIX] Make standard-search working with EXT:form installed 42/28042/2
authorOliver Hader <oliver@typo3.org>
Tue, 4 Mar 2014 15:08:34 +0000 (16:08 +0100)
committerJigal van Hemert <jigal.van.hemert@typo3.org>
Tue, 4 Mar 2014 15:55:53 +0000 (16:55 +0100)
The standard-search relies on basic form-functionality.
But if EXT:form is installed, that functionality is overlaid
and the result is wrong.

Provide a flag so that standard-search can request to use
the "basic" form-functionality, preventing EXT:form from
dealing with it.

Change-Id: I52cbd6cecc7222217ff766393dd37ad9d1a9aa30
Resolves: #50274
Releases: 6.2, 6.1
Reviewed-on: https://review.typo3.org/28042
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
typo3/sysext/css_styled_content/static/setup.txt
typo3/sysext/form/Classes/Controller/FormController.php

index e68ec0f..7d131ae 100644 (file)
@@ -1719,6 +1719,7 @@ tt_content.mailform = COA
 tt_content.mailform.10 = < lib.stdheader
 tt_content.mailform.20 = FORM
 tt_content.mailform.20 {
+       useDefaultContentObject = 1
        accessibility = 1
        noWrapAttr=1
        formName = mailform
index b0cbda2..75a7b9f 100644 (file)
@@ -92,7 +92,9 @@ class FormController {
         */
        public function cObjGetSingleExt($typoScriptObjectName, array $typoScript, $typoScriptKey, \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $contentObject) {
                $content = '';
-               if ($typoScriptObjectName === 'FORM') {
+               if ($typoScriptObjectName === 'FORM' && !empty($typoScript['useDefaultContentObject'])) {
+                       $content = $contentObject->getContentObject($typoScriptObjectName)->render($typoScript);
+               } elseif ($typoScriptObjectName === 'FORM') {
                        if ($contentObject->data['CType'] === 'mailform') {
                                $bodytext = $contentObject->data['bodytext'];
                                /** @var $typoScriptParser \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser */