We have a Plone 4.3.9 site which uses some Archetypes-based content types and some Dexterity types.
Trying to move the site to Plone 5.1 does not work since it is impossible to load the ZMI of the Plone site for accessing the upgrade functionality.
Traceback (innermost last):
Module ZPublisher.Publish, line 249, in publish_module_standard
Module ZPublisher.Publish, line 197, in publish
Module zope.event, line 31, in notify
Module zope.component.event, line 27, in dispatch
Module zope.component._api, line 139, in subscribers
Module zope.interface.registry, line 442, in subscribers
Module ZODB.Connection, line 800, in setstate
Module ZODB.serialize, line 623, in setGhostState
Module zope.component.persistentregistry, line 39, in __setstate__
Module zope.interface.adapter, line 97, in _createLookup
Module zope.interface.adapter, line 458, in __init__
Module zope.interface.adapter, line 495, in init_extendors
Module zope.interface.adapter, line 499, in add_extendor
AttributeError: type object 'ICacheManager' has no attribute '__iro__'
The problem could not be solved neither with wildcard.fixpersistentutilities nor moving the Data.fs to a fresh Plone 5.1 site without any extensions. Also accessing the related objects by their OID did not help much. I can access the Plone objects using bin/instance debug at least to a certain degree...so the data is still existent..
ICacheManager is part of wicked. See https://community.plone.org/t/problem-migrating-from-archetypes-to-dexterity-via-atct-migrator/4866/20 for discussion and solution.
This is not directly related to Wicked since there are also related issues with other marker interfaces
AttributeError: type object 'IGeoMarkerUtility' has no attribute '__iro__'
See http://lmgtfy.com/?q=IGeoMarkerUtility. IGeoMarkerUtility is part of collective.geo.contentlocations. You should clean up the old instance before upgrading. You can look at https://github.com/collective/collective.geo.contentlocations/blob/master/src/collective/geo/contentlocations/upgrades.py for a upgrade-step that removes this utility. But personalIy I would probably use plone.app.upgrade.utils.alias_module to mock it and then remove it after migrating.
This kind of problem with broken interface objects is pretty common when upgrading and it would be nice if we handled it better. I'm not sure if zope.interface should be modified to handle broken interfaces that don't have an __iro__, or if the ZODB should be modified to put an empty __iro__ on broken objects. Either way we should probably still log a warning.
Most helpful comment
This kind of problem with broken interface objects is pretty common when upgrading and it would be nice if we handled it better. I'm not sure if zope.interface should be modified to handle broken interfaces that don't have an
__iro__, or if the ZODB should be modified to put an empty__iro__on broken objects. Either way we should probably still log a warning.