摆脱 Plone4Artists 日历 - 从 Plone 3.3.5 迁移到 Plone 4.0.7

发布于 2024-12-07 00:13:51 字数 1313 浏览 0 评论 0原文

我正在尝试从 Plone 3.3.5 站点删除 P4Artists Calendar,以将其升级到 Plone 4.0.7。

我运行了一个脚本来删除所有对象的所有接口,具体来说:

'p4a.subtyper.interfaces.ISubtyped',
'p4a.calendar.interfaces.ICalendarEnhanced',
'p4a.calendar.interfaces.IPossibleCalendar',
'p4a.calendar.interfaces.ICalendarConfig',
'p4a.calendar.interfaces.IEventProvider',
'p4a.calendar.interfaces.IEvent',
'p4a.calendar.interfaces.IBasicCalendarSupport',
'p4a.calendar.interfaces.ICalendarSupport'

我正在使用的脚本使用 zope.interfaces.noLongerProvides 来摆脱对象。首先,我进行目录搜索并找到具有接口的对象,然后 noLongerProvides(object, interface)。

完成此操作后,我可以删除除“p4a.calendar.interfaces.IPossibleCalendar”之外的所有接口。该界面似乎适用于站点上的所有文件夹和集合,当尝试删除它们时,我遇到了异常。有谁了解这个界面的更多信息以及摆脱它的正确方法是什么?

编辑:

这是我的脚本生成的错误消息:

Exception at removeinterfaces for interface p4a.calendar.interfaces.IPossibleCalendar 
Exception type: exceptions.ValueError 
Exception value: Can only remove directly provided interfaces. 
Exception traceback (starting next line):
File "remove-p4a.py", line 53, in removeinterfaces
  noLongerProvides(obj, interface)
File "d:\plone-3.3.5-teste-20110927\zope2\lib\python\zope\interface\declarations.py",line 969, in noLongerProvides
  raise ValueError("Can only remove directly provided interfaces.")

I am trying to remove P4Artists Calendar from a Plone 3.3.5 site, to upgrade it to Plone 4.0.7.

I ran a script to remove all interfaces from all objects, specifically:

'p4a.subtyper.interfaces.ISubtyped',
'p4a.calendar.interfaces.ICalendarEnhanced',
'p4a.calendar.interfaces.IPossibleCalendar',
'p4a.calendar.interfaces.ICalendarConfig',
'p4a.calendar.interfaces.IEventProvider',
'p4a.calendar.interfaces.IEvent',
'p4a.calendar.interfaces.IBasicCalendarSupport',
'p4a.calendar.interfaces.ICalendarSupport'

The script I am using uses zope.interfaces.noLongerProvides to get the objects rid of them. First, I do a catalog search and find the objects with the interface, and then noLongerProvides(object, interface).

After doing that, I am able to remove all of them interfaces, except for 'p4a.calendar.interfaces.IPossibleCalendar'. This interface seems to be applied to all of the Folders and Collections at the site, and when trying to remove them, I get an exception. Does anyone know more of this interface and what is the correct way of getting rid of it?

EDIT:

Here are the error messages generated by my script:

Exception at removeinterfaces for interface p4a.calendar.interfaces.IPossibleCalendar 
Exception type: exceptions.ValueError 
Exception value: Can only remove directly provided interfaces. 
Exception traceback (starting next line):
File "remove-p4a.py", line 53, in removeinterfaces
  noLongerProvides(obj, interface)
File "d:\plone-3.3.5-teste-20110927\zope2\lib\python\zope\interface\declarations.py",line 969, in noLongerProvides
  raise ValueError("Can only remove directly provided interfaces.")

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一个人练习一个人 2024-12-14 00:13:51

这些似乎是仅在通过 zcml 启动时应用的接口。因此,删除它们的唯一方法就是从您的设置中删除该产品。

来源:http://svn.plone.org/svn/collective/p4a/p4a.plonecalendar/trunk/p4a/plonecalendar/configure.zcml

These seem to be interfaces that are only applied on startup via zcml. So the only way to remove them is to remove the product from your setup.

Source: http://svn.plone.org/svn/collective/p4a/p4a.plonecalendar/trunk/p4a/plonecalendar/configure.zcml

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文