Getting rid of Plone4Artists Calendar - migration from Plone 3.3.5 to Plone 4.0.7

我的梦境 提交于 2019-12-25 18:14:29

问题


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.")

回答1:


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



来源:https://stackoverflow.com/questions/7575770/getting-rid-of-plone4artists-calendar-migration-from-plone-3-3-5-to-plone-4-0

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!