Closed blueamerican closed 3 months ago
How do you register the MyEvent calendairze data structure. In the ext_localconf.php like here https://github.com/lochmueller/calendarize/blob/master/ext_localconf.php#L25 ? Perhaps you put the registration in ext_tables.php? Regards, Tim
I have this in the ext_tables.php from my extension
(static function() {
$configuration = [
'uniqueRegisterKey' => 'MyEvent', // A unique Key for the register (e.g. you Extension Key + "Event")
'title' => 'My Event', // The title for your events (this is shown in the FlexForm configuration of the Plugins)
'modelName' => \MarkusDuebbert\Myevent\Domain\Model\Myevent::class, // the name of your model
'partialIdentifier' => 'MyEvent', // the identifier of the partials for your event. In most cases this is also unique
'tableName' => 'tx_myevent_domain_model_myevent', // the table name of your event table
'required' => true, // set to true, than your event need a least one event configuration
//'subClasses' => array of classnames, // insert here all classNames, which are used for the extended models
];
\HDNET\Calendarize\Register::extTables($configuration);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_myevent_domain_model_myevent', 'EXT:myevent/Resources/Private/Language/locallang_csh_tx_myevent_domain_model_myevent.xlf');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_myevent_domain_model_myevent');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_myevent_domain_model_tags', 'EXT:myevent/Resources/Private/Language/locallang_csh_tx_myevent_domain_model_tags.xlf');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_myevent_domain_model_tags');
})();
And do you call this in your ext_localconf.php of your extension too? https://github.com/lochmueller/calendarize/blob/master/Classes/Register.php#L36
$configuration = [
'uniqueRegisterKey' => 'MyEvent', // A unique Key for the register (e.g. you Extension Key + "Event")
'title' => 'My Event', // The title for your events (this is shown in the FlexForm configuration of the Plugins)
'modelName' => \MarkusDuebbert\Myevent\Domain\Model\Myevent::class, // the name of your model
'partialIdentifier' => 'MyEvent', // the identifier of the partials for your event. In most cases this is also unique
'tableName' => 'tx_myevent_domain_model_myevent', // the table name of your event table
'required' => true, // set to true, than your event need a least one event configuration
//'subClasses' => array of classnames, // insert here all classNames, which are used for the extended models
];
\HDNET\Calendarize\Register::extLocalconf($configuration);
ext_tables.php is for backend context and ext_localconf.php for every context. If you call a FE page, without backend session perhaps you will get this error, because the registration is missing in FE.
@lochmueller
This was exactly my fault.. i didn't had a call in ext_localconf.php, only in ext_tables.php
i did it now as described here:
https://docs.typo3.org/p/lochmueller/calendarize/12.4/en-us/DeveloperManual/OwnEvents/Index.html
it works.. thanks a lot!
Hello,
i get sometimes the error, see also attached screen.
Core: Exception handler (WEB): Uncaught TYPO3 Exception: #123678123: No valid configuration for the current index: MyEvent | HDNET\Calendarize\Exception\InvalidConfigurationException thrown in file /kunden/../typo3conf/ext/calendarize/Classes/Domain/Model/Index.php in line 143. Requested URL: https://www.hachenburger-kulturzeit.de/programm/festefestivals/monat/2024/4
https://www.hachenburger-kulturzeit.de/programm/querbeet/monat/2024/5 https://www.hachenburger-kulturzeit.de https://www.hachenburger-kulturzeit.de/musik
It has to do with the cache. I f i clear the cache, the error sometimes diappears.
Has anybody an idea, where my fault is?
Most of the time it works, but sometimes the error appears.
strange is: if i open the page first in firefox (mac), it works https://www.hachenburger-kulturzeit.de/programm/querbeet/monat/2024/4 if i open the page first in chrome or safari (mac), the error comes
after opening a page in firefox, it also works in other browsers (cache)
TYPO3 11 calendarize 12.4.4 autoloader 7.4.4 own exension with own model![_Bildschirmfoto 2024-03-05 um 09 44 31 Kopie](https://github.com/lochmueller/calendarize/assets/5647051/85bfc945-aaf0-428e-82ff-889dbb792825)