Reputation: 39
Being my TYPO3 extension called "my_content", I wanna create a plugin that lists a bunch of personas.
web/typo3conf/ext/my_content/Configuration/TSconfig/ContentElements/persona.tsconfig:
mod.wizards.newContentElement.wizardItems.plugins {
elements {
persona {
iconIdentifier = tx-mask-persona
title = LLL:EXT:my_content/Resources/Private/Language/locallang_db.xlf:tx_mycontent_domain_model_persona
description = LLL:EXT:my_content/Resources/Private/Language/locallang_db.xlf:tx_mycontent_domain_model_persona.description
tt_content_defValues {
CType = list
list_type = mycontent_persona
}
}
}
show := addToList(persona)
}
web/typo3conf/ext/my_content/Configuration/TCA/Overrides/tt_content.php:
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'Vendor.my_content',
'Persona',
'Personas'
);
web/typo3conf/ext/my_content/ext_localconf.php:
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Vendor.my_content',
'Persona',
[
'Persona' => 'list'
],
// non-cacheable actions
[
'Persona' => 'list'
]
);
I receive the error below:
Oops, an error occurred!
The default controller for extension "MyContent" and plugin "Persona" can not be determined. Please check for
TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin() in your ext_localconf.php.
Is all the naming of plugins, vendor, etc, right? Is there something I'm doing wrong? Using TYPO3 8.7.18.
Upvotes: 1
Views: 984
Reputation: 6164
You need to use the camelcase type in registerPlugin()
and configurePlugin()
for your extension name, so don't use my_content
, it's MyContent
in this case.
Upvotes: 2
Reputation: 39
My TypoScript looks fine:
tt_content.list.20 {
mycontent_persona = USER
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
extensionName = MyContent
pluginName = Persona
vendorName = Vendor
}
And my list_type plugin is "mycontent_persona".
I don't really know what's wrong with the plugin. All seems fine. Cache is cleared as well.
Upvotes: 0