【问题标题】:Storage Folder is not found in DB - TYPO3 Extension development在 DB 中找不到存储文件夹 - TYPO3 扩展开发
【发布时间】:2021-07-15 10:19:25
【问题描述】:

我是扩展开发的新手。 我使用扩展生成器创建了一个工作申请扩展。 数据已成功保存到 DB 但未保存到存储文件夹。我已经从后端链接了文件夹。 截图:https://nimb.ws/wuIvTYhttps://nimb.ws/pLaoJd

请帮帮我。

【问题讨论】:

    标签: typo3 typo3-extensions


    【解决方案1】:

    我认为原因可能在于扩展生成器生成的代码。在setup.txtsetup.typoscriptExtBuilder 中的地方代码如下:

    plugin.tx_myExt_myPlugin {
        view {
            templateRootPaths.0 = EXT:myExt/Resources/Private/Templates/
            templateRootPaths.1 = {$plugin.tx_myExt_myPlugin.view.templateRootPath}
            partialRootPaths.0 = EXT:myExt/Resources/Private/Partials/
            partialRootPaths.1 = {$plugin.tx_myExt_myPlugin.view.partialRootPath}
            layoutRootPaths.0 = EXT:myExt/Resources/Private/Layouts/
            layoutRootPaths.1 = {$plugin.tx_myExt_myPlugin.view.layoutRootPath}
        }
        persistence {
            storagePid = {$plugin.tx_myExt_myPlugin.persistence.storagePid}
            #recursive = 1
        }
        features {
            #skipDefaultArguments = 1
            # if set to 1, the enable fields are ignored in BE context
            ignoreAllEnableFieldsInBe = 0
            # Should be on by default, but can be disabled if all action in the plugin are uncached
            requireCHashArgumentForActionArguments = 1
        }
        mvc {
            #callDefaultActionIfActionCantBeResolved = 1
        }
    }
    

    这里的问题是 storagePid 没有设置的那一行。在重新生成插件之前,删除此行只会暂时起作用,因此您可以做的是在 ExtBuilder 标记下添加以下行:

    ## EXTENSION BUILDER DEFAULTS END TOKEN - Everything BEFORE this line is overwritten with the defaults of the extension builder
    
    plugin.tx_myExt_myPlugin.persistence >
    

    之后你的控制器应该使用你在插件配置中设置的存储空间。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-07-05
      • 1970-01-01
      相关资源
      最近更新 更多