Files
VITEC-website/packages/vitec/ext_localconf.php
T
orascheandClaude Fable 5 63f950f9db SSR control center: auto-purge webhook, dashboard tiles, backend module
Package 1: SsrPurgeService posts to the node /__purge (endpoint+secret in var/vitec-ssr-purge.env, outside git) and logs every attempt to tx_vitec_ssrpurgelog. DataHandler hooks queue per request and flush once: pages with nav-relevant field changes and all tx_news_/tx_vitec_ records purge everything, other page/content edits purge the hosting page path. Gated by the routing flag and the new Site Set switch vitec.ssr.autoPurge. Flipping the SSR switch ON purges everything once. CLI: vitec:ssr-purge, vitec:ssr-health (samples /__health into tx_vitec_ssrhealthlog, 14 days kept, scheduler-ready). Package 2: dashboard widgets vitecSsrStatus (live health, release, switch, last purge) and vitecSsrStats (purge counts, failures, uptime, response time). Package 3: backend module web_vitecssr with manual purge (paths or everything) and both protocols. Tested end to end against the running node (purge single/all 200, health sample logged).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-11-09 20:46:16 +01:00

271 lines
8.3 KiB
PHP
Executable File

<?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';
// FormEngine fieldWizard: "Structured Data generieren" button below the
// product structureddata field (see TCA + StructuredDataGeneratorWizard).
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1750000000] = [
'nodeName' => 'structuredDataGenerator',
'priority' => 40,
'class' => \Evomedien\Vitec\Backend\FormEngine\StructuredDataGeneratorWizard::class,
];
(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',
'Marketlist',
[
\Evomedien\Vitec\Controller\MarketController::class => 'list'
],
[
\Evomedien\Vitec\Controller\MarketController::class => 'list'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Solutionlist',
[
\Evomedien\Vitec\Controller\SolutionController::class => 'list'
],
[
\Evomedien\Vitec\Controller\SolutionController::class => 'list'
]
);
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'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Eventlist',
[
\Evomedien\Vitec\Controller\EventController::class => 'list'
],
[
\Evomedien\Vitec\Controller\EventController::class => 'list'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Locationlist',
[
\Evomedien\Vitec\Controller\LocationController::class => 'list'
],
[
\Evomedien\Vitec\Controller\LocationController::class => 'list'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Customerlogos',
[
\Evomedien\Vitec\Controller\CustomerController::class => 'list'
],
[
\Evomedien\Vitec\Controller\CustomerController::class => 'list'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Modelcard',
[
\Evomedien\Vitec\Controller\ModelcardController::class => 'list'
],
[
\Evomedien\Vitec\Controller\ModelcardController::class => 'list'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Contactform',
[
\Evomedien\Vitec\Controller\FormController::class => 'list'
],
[
\Evomedien\Vitec\Controller\FormController::class => 'list'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Demoform',
[
\Evomedien\Vitec\Controller\FormController::class => 'list'
],
[
\Evomedien\Vitec\Controller\FormController::class => 'list'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Helpdeskform',
[
\Evomedien\Vitec\Controller\FormController::class => 'list'
],
[
\Evomedien\Vitec\Controller\FormController::class => 'list'
]
);
})();
// The JSON search endpoint (SearchJsonRenderer) uses plain `q` and `page` GET
// parameters. Without this exclusion TYPO3 demands a cHash for them and answers
// with an error page; the no_cache condition in the Vitecset TypoScript makes
// sure search responses are rendered fresh instead of sticking in the page cache.
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'q';
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'page';
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'filter';
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'market';
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'category';
// SSR auto-purge: editors' changes evict the matching pages from the SSR
// node's full-page cache (queued per request, one call per save/import).
// Active only while the SSR flag is ON and vitec.ssr.autoPurge is enabled.
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['vitec_ssrpurge']
= \Evomedien\Vitec\Hooks\DataHandlerSsrPurge::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass']['vitec_ssrpurge']
= \Evomedien\Vitec\Hooks\DataHandlerSsrPurge::class;