我不知道爲什麼,但錯誤只是消失沒有任何改變。現在它可以工作。我沒有改變任何東西。 (我刪除緩存多次,因此它不能是因爲高速緩存)Typo3後端模塊表格錯誤
問題
我使用擴展生成器(如果任何人知道任何好的文檔,請給我聯繫,因爲官方文檔不創建一個擴展有任何例子)。 我有一個表格,當我提交表單我有錯誤
TYPO3 V4.7
操作「formSave」(控制器「啓動子」)不受這個插件允許的。請檢查ext_localconf.php中的Tx_Extbase_Utility_Extension :: configurePlugin()。
根據typo的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)
)
);
PromotersControler
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() {
}
}
你能不能也請你的動作?你在使用flexform嗎?如果你可能需要添加你的動作。 – Wipster
如果你的意思是我加了控制器。我不確定我是否使用flexform,所以我認爲我不是。我只是用擴展程序生成器進行擴展,然後嘗試使表單工作。 – tttpapi