【问题标题】:Upgrading 4.0.10 to Plone 5 (missing IRegistry?)将 4.0.10 升级到 Plone 5(缺少 IRegistry?)
【发布时间】:2015-12-06 01:44:58
【问题描述】:

我正在尝试将 Plone 4.0.10 站点升级到 5.0。我升级到 4.3.6 并且有点痛苦地让它在那里工作。在我的Data.fs 中,我有两个 Plone 站点:有问题的站点和另一个只有默认内容(新闻、事件、用户)的站点。当我将 Data.fs 和 blob 从 4.3.6 移动到 Plone 5 实例时,“空”站点升级正常。但是,如果我什至尝试转到生产站点的 ZMI 根目录,或者加载站点,我会得到:

    2015-12-05 17:19:24 ERROR Zope.SiteErrorLog 1449364764.10.146181213601 http://localhost:8080/mysite
    Traceback (innermost last):
      Module ZPublisher.Publish, line 127, in publish
      Module ZPublisher.BaseRequest, line 444, in traverse
      Module ZPublisher.BeforeTraverse, line 97, in __call__
      Module Products.CMFCore.PortalObject, line 75, in __before_publishing_traverse__
      Module zope.event, line 31, in notify
      Module zope.component.event, line 24, in dispatch
      Module zope.component._api, line 136, in subscribers
      Module zope.component.registry, line 321, in subscribers
      Module zope.interface.adapter, line 585, in subscribers
      Module zope.component.event, line 32, in objectEventNotify
      Module zope.component._api, line 136, in subscribers
      Module zope.component.registry, line 321, in subscribers
      Module zope.interface.adapter, line 585, in subscribers
      Module plone.app.theming.plugins.hooks, line 33, in onRequest
      Module plone.app.theming.policy, line 91, in isThemeEnabled
    AttributeError: 'NoneType' object has no attribute 'enabled'

我不知道为什么会涉及到plone.app.theming,因为旧网站没有 Diazo 主题,我只是在加载 ZMI。另外,问题似乎是没有IRegistry

plone.app.theming.policy.getSettings:

    def getSettings(self):
    """Settings for current theme."""
    registry = queryUtility(IRegistry)

此时registryNoneplone.app.theming.policy.isThemeEnabled 中的settings 也是。

对如何进行有什么建议吗?

【问题讨论】:

  • 这看起来像个Bug,你可以填个Bug报告 --> plone.org/community
  • plone.app.theming 必须安装在 Plone 4 中。在您的 Plone 4.3.6 站点中包含 p.a.t 并重新升级。
  • @pabo,你是对的。如果你想把这个放在答案中,我会接受。
  • 因此,基本上,当从 Plone 的预重氮版本开始时,不应该在未经过后期 4.2 或 4.3 版本之一的中间步骤的情况下尝试升级到 5。在继续 5 之前,安装 plone.app.theming 需要该中间步骤。
  • 我在github中创建了一个问题:github.com/plone/Products.CMFPlone/issues/1284

标签: plone plone-5.x


【解决方案1】:

plone.app.theming 必须安装在 Plone 4 中。将 p.a.t 包含在您的 Plone 4.3.6 站点中并重新升级。 (How to upgrade sites to Plone 5, 24:15)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-07-07
    • 2016-01-07
    • 1970-01-01
    • 1970-01-01
    • 2020-05-27
    • 1970-01-01
    • 2018-12-04
    • 1970-01-01
    相关资源
    最近更新 更多