我不知道为什么,但错误只是消失而没有任何变化。现在它起作用了。我没有改变任何东西。(我多次删除缓存,所以不可能是因为缓存)
问题
我使用扩展生成器创建了一个扩展(如果有人知道任何好的文档,请给我链接,因为官方文档没有任何示例)。我有一个表格,当我提交表格时出现错误
TYPO3 v4.7
此插件不允许操作“formSave”(控制器“Promoters”)。请检查 ext_localconf.php 中的 Tx_Extbase_Utility_Extension::configurePlugin()。
我根据错字的 wiki 创建了 ext_localconf.php。
表格代码
<f:form action="formSave" name="" object="">
<f:form.textfield id="emailResendInterval" name="emailResendInterval" value="" />
<f:form.textarea cols="30" rows="5" id="emails" name="emails" value="" />
<f:form.submit name="submit" value="Save" />
</f:form>
ext_localconf.php
<?php
if (!defined ('TYPO3_MODE')) die ('Access denied.');
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$_EXTKEY] = unserialize($_EXTCONF);
if ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$_EXTKEY]['registerSinglePlugin']) {
// fully fletged blog
Tx_Extbase_Utility_Extension::configurePlugin(
$_EXTKEY, // The extension name (in UpperCamelCase) or the extension key (in lower_underscore)
'Promoters', // A unique name of the plugin in UpperCamelCase
array ( // An array holding the controller-action-combinations that are accessible
'Promoters' => 'configuration,formSave', // The first controller and its first action will be the default
),
array( // An array of non-cachable controller-action-combinations (they must already be enabled)
)
);
} else {
Tx_Extbase_Utility_Extension::configurePlugin(
$_EXTKEY, // The extension name (in UpperCamelCase) or the extension key (in lower_underscore)
'Promoters', // A unique name of the plugin in UpperCamelCase
array ( // An array holding the controller-action-combinations that are accessible
'Promoters' => 'configuration,formSave', // The first controller and its first action will be the default
),
array( // An array of non-cachable controller-action-combinations (they must already be enabled)
)
);
促销员控制器
class Tx_Promoters_Controller_PromotersController extends Tx_Extbase_MVC_Controller_ActionController {
/**
* action configuration
*
* @return void
*/
public function configurationAction() {
}
/**
* action formSave
*
* @return void
*/
public function formSaveAction() {
}
}