Typo3后端模块形成错误

时间:2013-08-06 07:56:20

标签: typo3 form-submit backend builder

我不知道为什么,但错误消失而没有任何变化。现在它有效。我什么都没改变。 (我删除了多次缓存,因此无法缓存)

问题

我使用扩展构建器创建了一个扩展(如果有人知道任何好的文档,请给我链接,因为官方文档没有任何示例)。 我有一个表单,当我提交表单时,我有错误

TYPO3 v4.7

  

此插件不允许操作“formSave”(控制器“Promoters”)。请检查ext_localconf.php中的Tx_Extbase_Utility_Extension :: configurePlugin()。

我根据拼写错误的维基创建了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() {

    }

}

1 个答案:

答案 0 :(得分:1)

实际上似乎很好,我不确定本地conf中的if语句。请试试这个:

    <?php
        if (!defined ('TYPO3_MODE')) die ('Access denied.');

            // fully fletged blog
            Tx_Extbase_Utility_Extension::configurePlugin(
                $_EXTKEY,                      
                'Promoters',     
                array (
                    'Promoters' => 'configuration,formSave', 
                ),
                array(                        
                )
            );
    ?>