【问题标题】:SilverStripe 4 with fluent: "Table 'ss4_project.Member_Localised' doesn't exist"SilverStripe 4 流畅:“表 'ss4_project.Member_Localised' 不存在”
【发布时间】:2021-09-24 09:56:23
【问题描述】:

我有一个使用 SilverStripe 4.8 和 fluent 5.0.0 的新项目。我已经为成员添加了一个扩展,并添加了带有要翻译的字段的流利扩展:

SilverStripe\Security\Member:
  extensions:
    - MemberExtension
    - TractorCow\Fluent\Extension\FluentExtension
  translate:
    - ShortDesc
    - Description

看起来很标准,但我在开发/构建期间得到Table 'ss4_project.Member_Localised' doesn't exist。我尝试过不使用翻译字段以及在成员扩展之后加载的不同配置。没有运气。

我觉得我错过了一些明显的东西。

感谢任何线索。

【问题讨论】:

  • 似乎在创建本地化表之前还有其他东西想要查询成员。如果您在开发环境中安装了 xdebug,您将看到回溯。在那里您应该能够检测到成员查询的来源。
  • @wmk 我不知道的核心表有表保护。 tractorcow 的回复为我指明了正确的方向:github.com/tractorcow-farm/silverstripe-fluent/issues/725

标签: silverstripe silverstripe-4


【解决方案1】:

在 Github 上,我有以下解决方案:

Security::force_database_is_ready(false); // only during dev/build

临时切换核心表的保护。

详情见https://github.com/tractorcow-farm/silverstripe-fluent/issues/725

【讨论】:

    猜你喜欢
    • 2012-12-26
    • 1970-01-01
    • 2020-09-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-05-15
    相关资源
    最近更新 更多