Resolves a cascade of TYPO3 v14 breaking changes that left every VITEC plugin's JSON output silently empty: 1. `list_type` column dropped — all renderer page-discovery queries now filter by `CType = 'vitec_X'`. 2. `#[AsAllowedCallable]` attribute added to every public render() — without it v14 throws AllowedCallableException, which headless silently filters via its "Oops, an error occurred!" guard. 3. `$GLOBALS['TSFE']->id` is null inside JSON cObj context — page id now read from the `frontend.page.information` request attribute (TSFE fallback kept for legacy entry points). 4. page.tsconfig wizard items migrated to `CType = vitec_X` directly (legacy `CType=list, list_type=...` no longer exists in v14). 5. ContainerChildrenProcessor + ContentElementResolver dispatch the PLUGIN_RENDERERS map by CType (primary) with list_type fallback. Beyond the bug fix this commit also contains: - Datasheets renderer rewritten to "products with newest datasheet" semantics (filtered via Download.hideondatasheets). - New vitec/card content block — multi-purpose card with backend preview and layout/background/aspect/alignment/border/shadow options. - New vitec_container CType (b13 single-column container, FlexForm cssClass propagated into the JSON envelope). - ContentElementResolver service for contentelement/contentelementcta link resolution; ContainerChildrenProcessor for nested plugin resolution inside b13 containers. - Vitecset setup.typoscript: ContentElement import moved to top so lib.contentElement is defined before VITEC's tt_content blocks. - Cleanup: 98 .bak.<timestamp> debugging backups removed; *.bak.* and /public/_assets_install/ added to .gitignore. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
143 lines
4.2 KiB
PHP
143 lines
4.2 KiB
PHP
<?php
|
|
defined('TYPO3') || die();
|
|
|
|
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
|
|
|
|
// Configure view template paths for the OG Image backend module
|
|
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['vitec']['view'] = [
|
|
'templateRootPaths' => ['10' => 'EXT:vitec/Resources/Private/Templates/'],
|
|
'layoutRootPaths' => ['10' => 'EXT:vitec/Resources/Private/Layouts/'],
|
|
'partialRootPaths' => ['10' => 'EXT:vitec/Resources/Private/Partials/'],
|
|
];
|
|
|
|
// Register VITEC Backend Layout data provider — 21 BE layouts, one per pages.layout (0..20)
|
|
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['BackendLayoutDataProvider']['vitec']
|
|
= \Evomedien\Vitec\View\BackendLayoutDataProvider::class;
|
|
|
|
// Auto-sync pages.backend_layout <- pages.layout via DataHandler hook
|
|
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['vitec-sync-backend-layout']
|
|
= \Evomedien\Vitec\Hook\SyncBackendLayoutHook::class;
|
|
|
|
// XClass BackendLayoutView so the page module always reflects pages.layout
|
|
// without the editor having to set backend_layout manually.
|
|
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][\TYPO3\CMS\Backend\View\BackendLayoutView::class] = [
|
|
'className' => \Evomedien\Vitec\View\VitecBackendLayoutView::class,
|
|
];
|
|
|
|
|
|
// Register custom VITEC CKEditor RTE preset
|
|
$GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['vitec'] = 'EXT:vitec/Configuration/RTE/Vitec.yaml';
|
|
|
|
(static function () {
|
|
// Register plugins
|
|
ExtensionUtility::configurePlugin(
|
|
'Vitec',
|
|
'Productlist',
|
|
[
|
|
\Evomedien\Vitec\Controller\ProductController::class => 'list'
|
|
],
|
|
[
|
|
\Evomedien\Vitec\Controller\ProductController::class => 'list'
|
|
]
|
|
);
|
|
|
|
ExtensionUtility::configurePlugin(
|
|
'Vitec',
|
|
'Simplecard',
|
|
[
|
|
\Evomedien\Vitec\Controller\SimplecardController::class => 'list'
|
|
],
|
|
[
|
|
\Evomedien\Vitec\Controller\SimplecardController::class => 'list'
|
|
]
|
|
);
|
|
|
|
ExtensionUtility::configurePlugin(
|
|
'Vitec',
|
|
'Productshow',
|
|
[
|
|
\Evomedien\Vitec\Controller\ProductController::class => 'show'
|
|
],
|
|
[
|
|
\Evomedien\Vitec\Controller\ProductController::class => 'show'
|
|
]
|
|
);
|
|
|
|
ExtensionUtility::configurePlugin(
|
|
'Vitec',
|
|
'Usecaseshow',
|
|
[
|
|
\Evomedien\Vitec\Controller\UsecaseController::class => 'show'
|
|
],
|
|
[
|
|
\Evomedien\Vitec\Controller\UsecaseController::class => 'show'
|
|
]
|
|
);
|
|
|
|
ExtensionUtility::configurePlugin(
|
|
'Vitec',
|
|
'Marketshow',
|
|
[
|
|
\Evomedien\Vitec\Controller\MarketController::class => 'show'
|
|
],
|
|
[
|
|
\Evomedien\Vitec\Controller\MarketController::class => 'show'
|
|
]
|
|
);
|
|
|
|
ExtensionUtility::configurePlugin(
|
|
'Vitec',
|
|
'Solutionshow',
|
|
[
|
|
\Evomedien\Vitec\Controller\SolutionController::class => 'show'
|
|
],
|
|
[
|
|
\Evomedien\Vitec\Controller\SolutionController::class => 'show'
|
|
]
|
|
);
|
|
|
|
ExtensionUtility::configurePlugin(
|
|
'Vitec',
|
|
'Usecaselist',
|
|
[
|
|
\Evomedien\Vitec\Controller\UsecaseController::class => 'list'
|
|
],
|
|
[
|
|
\Evomedien\Vitec\Controller\UsecaseController::class => 'list'
|
|
]
|
|
);
|
|
|
|
ExtensionUtility::configurePlugin(
|
|
'Vitec',
|
|
'Downloadcard',
|
|
[
|
|
\Evomedien\Vitec\Controller\DownloadController::class => 'list, show'
|
|
],
|
|
[
|
|
\Evomedien\Vitec\Controller\DownloadController::class => 'list, show'
|
|
]
|
|
);
|
|
|
|
ExtensionUtility::configurePlugin(
|
|
'Vitec',
|
|
'Downloadcardcollection',
|
|
[
|
|
\Evomedien\Vitec\Controller\DownloadController::class => 'downloadcardcollection'
|
|
],
|
|
[
|
|
\Evomedien\Vitec\Controller\DownloadController::class => 'downloadcardcollection'
|
|
]
|
|
);
|
|
ExtensionUtility::configurePlugin(
|
|
'Vitec',
|
|
'Datasheets',
|
|
[
|
|
\Evomedien\Vitec\Controller\DownloadController::class => 'datasheets'
|
|
],
|
|
[
|
|
\Evomedien\Vitec\Controller\DownloadController::class => 'datasheets'
|
|
]
|
|
);
|
|
|
|
})();
|