【问题标题】:Extbase repository findAll() returns nothingExtbase 存储库 findAll() 不返回任何内容
【发布时间】:2015-01-07 11:55:55
【问题描述】:

findAll() 在我的 FE 的方法中的存储库中找不到任何内容,但它在我的 BE 中有效。

public function showAction() {
    $p = $this->modulRepository->findAll();
    $this->view->assign('pruefling',$p);
}

我尝试添加

plugin.tx_rere.persistence.storagePid = 4

到我的 TypoScript 设置 -> extbase repository findAll() returns result null。 该表不为空。

但还是不行。

【问题讨论】:

  • 您的条目的 PID 是多少?如果您未设置任何 storagePID,则默认使用 0。你只使用前端插件还是后端模块?您必须为模块单独设置 storagePID。
  • 使用 TypoScript 对象浏览器检查 storagePid 是否正确应用。

标签: typo3 extbase typo3-6.2.x


【解决方案1】:

这是因为没有给出确切的存储pid

plugin.tx_urpluggin.persistence.storagePid = 4

要知道你是否给了正确的存储pid

  1. 转到模板模块
  2. 选择根模板
  3. 从顶部下拉列表中选择打字对象浏览器
  4. 检查插件中的配置

如果存储pid 是空的,那么点击你会得到一个typoscript。将此粘贴到您的主模板中。

【讨论】:

    猜你喜欢
    • 2018-03-21
    • 2011-04-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-14
    相关资源
    最近更新 更多