Commit 69928c63 authored by Steffen Ritter's avatar Steffen Ritter Committed by Christian Kuhn
Browse files

[BUGFIX] Restore Content Objects in all TYPO3_mode cases

When #64386 introduced a new API for registering ContentOjects
the registration of the existing core-shipped ContentObjects
was wrapped in a "if (TYPO3_mode == FE)" clause.

This results in an empty set of ContentObjects in CLI or
Backend context.

Resolves: #68188
Releases: master
Change-Id: Iabf63ae6d861aab1f9e744cf66f3438dec78c300
Reviewed-on: http://review.typo3.org/41361


Reviewed-by: Benni Mack's avatarBenjamin Mack <benni@typo3.org>
Tested-by: Benni Mack's avatarBenjamin Mack <benni@typo3.org>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 7281ab4a
......@@ -16,29 +16,26 @@ if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['extTablesIncl
}
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['extTablesInclusion-PostProcessing'][] = \TYPO3\CMS\Compatibility6\Hooks\ExtTablesPostProcessing\TcaMigration::class;
if (TYPO3_MODE === 'FE') {
// Register legacy content objects
$GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['IMGTEXT'] = \TYPO3\CMS\Compatibility6\ContentObject\ImageTextContentObject::class;
$GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['CLEARGIF'] = \TYPO3\CMS\Compatibility6\ContentObject\ClearGifContentObject::class;
$GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['CTABLE'] = \TYPO3\CMS\Compatibility6\ContentObject\ContentTableContentObject::class;
$GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['OTABLE'] = \TYPO3\CMS\Compatibility6\ContentObject\OffsetTableContentObject::class;
$GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['COLUMNS'] = \TYPO3\CMS\Compatibility6\ContentObject\ColumnsContentObject::class;
$GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['HRULER'] = \TYPO3\CMS\Compatibility6\ContentObject\HorizontalRulerContentObject::class;
$GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['FORM'] = \TYPO3\CMS\Compatibility6\ContentObject\FormContentObject::class;
$GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['SEARCHRESULT'] = \TYPO3\CMS\Compatibility6\ContentObject\SearchResultContentObject::class;
// deprecated alias names for cObjects in use
$GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['COBJ_ARRAY'] = \TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayContentObject::class;
$GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['CASEFUNC'] = \TYPO3\CMS\Frontend\ContentObject\CaseContentObject::class;
// Register legacy content objects
$GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['IMGTEXT'] = \TYPO3\CMS\Compatibility6\ContentObject\ImageTextContentObject::class;
$GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['CLEARGIF'] = \TYPO3\CMS\Compatibility6\ContentObject\ClearGifContentObject::class;
$GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['CTABLE'] = \TYPO3\CMS\Compatibility6\ContentObject\ContentTableContentObject::class;
$GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['OTABLE'] = \TYPO3\CMS\Compatibility6\ContentObject\OffsetTableContentObject::class;
$GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['COLUMNS'] = \TYPO3\CMS\Compatibility6\ContentObject\ColumnsContentObject::class;
$GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['HRULER'] = \TYPO3\CMS\Compatibility6\ContentObject\HorizontalRulerContentObject::class;
$GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['FORM'] = \TYPO3\CMS\Compatibility6\ContentObject\FormContentObject::class;
$GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['SEARCHRESULT'] = \TYPO3\CMS\Compatibility6\ContentObject\SearchResultContentObject::class;
// deprecated alias names for cObjects in use
$GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['COBJ_ARRAY'] = \TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayContentObject::class;
$GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['CASEFUNC'] = \TYPO3\CMS\Frontend\ContentObject\CaseContentObject::class;
// Register a hook for data submission
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkDataSubmission']['mailform'] = \TYPO3\CMS\Compatibility6\Controller\FormDataSubmissionController::class;
// Register a hook for data submission
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkDataSubmission']['mailform'] = \TYPO3\CMS\Compatibility6\Controller\FormDataSubmissionController::class;
// Register hooks for xhtml_cleaning and prefixLocalAnchors
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-all'][] = \TYPO3\CMS\Compatibility6\Hooks\TypoScriptFrontendController\ContentPostProcHook::class . '->contentPostProcAll';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-cached'][] = \TYPO3\CMS\Compatibility6\Hooks\TypoScriptFrontendController\ContentPostProcHook::class . '->contentPostProcCached';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-output'][] = \TYPO3\CMS\Compatibility6\Hooks\TypoScriptFrontendController\ContentPostProcHook::class . '->contentPostProcOutput';
}
// Register hooks for xhtml_cleaning and prefixLocalAnchors
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-all'][] = \TYPO3\CMS\Compatibility6\Hooks\TypoScriptFrontendController\ContentPostProcHook::class . '->contentPostProcAll';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-cached'][] = \TYPO3\CMS\Compatibility6\Hooks\TypoScriptFrontendController\ContentPostProcHook::class . '->contentPostProcCached';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-output'][] = \TYPO3\CMS\Compatibility6\Hooks\TypoScriptFrontendController\ContentPostProcHook::class . '->contentPostProcOutput';
/**
* CType "mailform"
......
......@@ -10,6 +10,29 @@ if (TYPO3_MODE === 'FE' && !isset($_REQUEST['eID'])) {
);
}
// Register all available content objects
$GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects'] = array_merge($GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects'], array(
'TEXT' => \TYPO3\CMS\Frontend\ContentObject\TextContentObject::class,
'CASE' => \TYPO3\CMS\Frontend\ContentObject\CaseContentObject::class,
'COA' => \TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayContentObject::class,
'COA_INT' => \TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayInternalContentObject::class,
'USER' => \TYPO3\CMS\Frontend\ContentObject\UserContentObject::class,
'USER_INT' => \TYPO3\CMS\Frontend\ContentObject\UserInternalContentObject::class,
'FILE' => \TYPO3\CMS\Frontend\ContentObject\FileContentObject::class,
'FILES' => \TYPO3\CMS\Frontend\ContentObject\FilesContentObject::class,
'IMAGE' => \TYPO3\CMS\Frontend\ContentObject\ImageContentObject::class,
'IMG_RESOURCE' => \TYPO3\CMS\Frontend\ContentObject\ImageResourceContentObject::class,
'CONTENT' => \TYPO3\CMS\Frontend\ContentObject\ContentContentObject::class,
'RECORDS' => \TYPO3\CMS\Frontend\ContentObject\RecordsContentObject::class,
'HMENU' => \TYPO3\CMS\Frontend\ContentObject\HierarchicalMenuContentObject::class,
'LOAD_REGISTER' => \TYPO3\CMS\Frontend\ContentObject\LoadRegisterContentObject::class,
'RESTORE_REGISTER' => \TYPO3\CMS\Frontend\ContentObject\RestoreRegisterContentObject::class,
'TEMPLATE' => \TYPO3\CMS\Frontend\ContentObject\TemplateContentObject::class,
'FLUIDTEMPLATE' => \TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::class,
'SVG' => \TYPO3\CMS\Frontend\ContentObject\ScalableVectorGraphicsContentObject::class,
'EDITPANEL' => \TYPO3\CMS\Frontend\ContentObject\EditPanelContentObject::class
));
if (TYPO3_MODE === 'FE') {
// Register eID provider for showpic
......@@ -17,28 +40,6 @@ if (TYPO3_MODE === 'FE') {
// Register eID provider for ExtDirect for the frontend
$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['ExtDirect'] = 'EXT:frontend/Resources/PHP/Eid/ExtDirect.php';
// Register all available content objects
$GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects'] = array_merge($GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects'], array(
'TEXT' => \TYPO3\CMS\Frontend\ContentObject\TextContentObject::class,
'CASE' => \TYPO3\CMS\Frontend\ContentObject\CaseContentObject::class,
'COA' => \TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayContentObject::class,
'COA_INT' => \TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayInternalContentObject::class,
'USER' => \TYPO3\CMS\Frontend\ContentObject\UserContentObject::class,
'USER_INT' => \TYPO3\CMS\Frontend\ContentObject\UserInternalContentObject::class,
'FILE' => \TYPO3\CMS\Frontend\ContentObject\FileContentObject::class,
'FILES' => \TYPO3\CMS\Frontend\ContentObject\FilesContentObject::class,
'IMAGE' => \TYPO3\CMS\Frontend\ContentObject\ImageContentObject::class,
'IMG_RESOURCE' => \TYPO3\CMS\Frontend\ContentObject\ImageResourceContentObject::class,
'CONTENT' => \TYPO3\CMS\Frontend\ContentObject\ContentContentObject::class,
'RECORDS' => \TYPO3\CMS\Frontend\ContentObject\RecordsContentObject::class,
'HMENU' => \TYPO3\CMS\Frontend\ContentObject\HierarchicalMenuContentObject::class,
'LOAD_REGISTER' => \TYPO3\CMS\Frontend\ContentObject\LoadRegisterContentObject::class,
'RESTORE_REGISTER' => \TYPO3\CMS\Frontend\ContentObject\RestoreRegisterContentObject::class,
'TEMPLATE' => \TYPO3\CMS\Frontend\ContentObject\TemplateContentObject::class,
'FLUIDTEMPLATE' => \TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::class,
'SVG' => \TYPO3\CMS\Frontend\ContentObject\ScalableVectorGraphicsContentObject::class,
'EDITPANEL' => \TYPO3\CMS\Frontend\ContentObject\EditPanelContentObject::class
));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment