Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add uninstall handler #75

Merged
merged 2 commits into from
Nov 25, 2019
Merged

add uninstall handler #75

merged 2 commits into from
Nov 25, 2019

Conversation

petschki
Copy link
Member

@petschki petschki commented Nov 5, 2019

fixes #64

@coveralls
Copy link

coveralls commented Nov 5, 2019

Coverage Status

Coverage increased (+0.04%) to 45.423% when pulling c8e557d on petschki/issue-64 into 63a7824 on master.

@mtrebron
Copy link

mtrebron commented Nov 6, 2019

Versionsübersicht
Plone 5.0.10 (5020)
CMF 2.2.10
Zope 2.13.27
Python 2.7.12 (default, Nov 12 2018, 14:36:49) [GCC 5.4.0 20160609]
PIL 4.2.1 (Pillow)

Installed, added a taxonomy, terms in a few languages. Uninstalled via control panel.

Noticed a stray key in the registry:

Name | Titel | Beschreibung | Typ | Wert
collective taxonomies | Taxonomien |   | List | []

Removing from buildout and re-running buildout results in:

2019-11-06 17:47:36 WARNING OFS.Uninstalled Could not import class 'ITaxonomy' from module 'collective.taxonomy.interfaces'
2019-11-06 17:47:36 WARNING OFS.Uninstalled Could not import class 'Taxonomy' from module 'collective.taxonomy.utility'
2019-11-06 17:47:36 ERROR ZODB.Connection Couldn't load state for 0x0106
Traceback (most recent call last):
  File "/usr/local/Plone5_ZEO/buildout-cache/eggs/ZODB3-3.10.7-py2.7-linux-x86_64.egg/ZODB/Connection.py", line 860, in setstate
    self._setstate(obj)
  File "/usr/local/Plone5_ZEO/buildout-cache/eggs/ZODB3-3.10.7-py2.7-linux-x86_64.egg/ZODB/Connection.py", line 914, in _setstate
    self._reader.setGhostState(obj, p)
  File "/usr/local/Plone5_ZEO/buildout-cache/eggs/ZODB3-3.10.7-py2.7-linux-x86_64.egg/ZODB/serialize.py", line 613, in setGhostState
    obj.__setstate__(state)
  File "/usr/local/Plone5_ZEO/buildout-cache/eggs/zope.component-3.9.5-py2.7.egg/zope/component/persistentregistry.py", line 40, in __setstate__
    self._createLookup()
  File "/usr/local/Plone5_ZEO/buildout-cache/eggs/zope.interface-3.6.7-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 91, in _createLookup
    self._v_lookup = self.LookupClass(self)
  File "/usr/local/Plone5_ZEO/buildout-cache/eggs/zope.interface-3.6.7-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 439, in __init__
    self.init_extendors()
  File "/usr/local/Plone5_ZEO/buildout-cache/eggs/zope.interface-3.6.7-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 476, in init_extendors
    self.add_extendor(p)
  File "/usr/local/Plone5_ZEO/buildout-cache/eggs/zope.interface-3.6.7-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 480, in add_extendor
    for i in provided.__iro__:
AttributeError: type object 'ITaxonomy' has no attribute '__iro__'
2019-11-06 17:47:36 ERROR ZODB.Connection Couldn't load state for 0x0106
Traceback (most recent call last):
  File "/usr/local/Plone5_ZEO/buildout-cache/eggs/ZODB3-3.10.7-py2.7-linux-x86_64.egg/ZODB/Connection.py", line 860, in setstate
    self._setstate(obj)
  File "/usr/local/Plone5_ZEO/buildout-cache/eggs/ZODB3-3.10.7-py2.7-linux-x86_64.egg/ZODB/Connection.py", line 914, in _setstate
    self._reader.setGhostState(obj, p)
  File "/usr/local/Plone5_ZEO/buildout-cache/eggs/ZODB3-3.10.7-py2.7-linux-x86_64.egg/ZODB/serialize.py", line 613, in setGhostState
    obj.__setstate__(state)
  File "/usr/local/Plone5_ZEO/buildout-cache/eggs/zope.component-3.9.5-py2.7.egg/zope/component/persistentregistry.py", line 40, in __setstate__
    self._createLookup()
  File "/usr/local/Plone5_ZEO/buildout-cache/eggs/zope.interface-3.6.7-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 91, in _createLookup
    self._v_lookup = self.LookupClass(self)
  File "/usr/local/Plone5_ZEO/buildout-cache/eggs/zope.interface-3.6.7-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 439, in __init__
    self.init_extendors()
  File "/usr/local/Plone5_ZEO/buildout-cache/eggs/zope.interface-3.6.7-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 476, in init_extendors
    self.add_extendor(p)
  File "/usr/local/Plone5_ZEO/buildout-cache/eggs/zope.interface-3.6.7-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 480, in add_extendor
    for i in provided.__iro__:
AttributeError: type object 'ITaxonomy' has no attribute '__iro__'
2019-11-06 17:47:36 ERROR Zope.SiteErrorLog 1573058856.130.4298815459 http://pnz-ubuntu:8585/mdb
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.browserlayer.layer, line 17, in mark_layer
  Module zope.component._api, line 179, in getAllUtilitiesRegisteredFor
  Module zope.component.registry, line 176, in getAllUtilitiesRegisteredFor
  Module ZODB.Connection, line 860, in setstate
  Module ZODB.Connection, line 914, in _setstate
  Module ZODB.serialize, line 613, in setGhostState
  Module zope.component.persistentregistry, line 40, in __setstate__
  Module zope.interface.adapter, line 91, in _createLookup
  Module zope.interface.adapter, line 439, in __init__
  Module zope.interface.adapter, line 476, in init_extendors
  Module zope.interface.adapter, line 480, in add_extendor
AttributeError: type object 'ITaxonomy' has no attribute '__iro__'
2019-11-06 17:47:36 ERROR ZODB.Connection Couldn't load state for 0x0106
Traceback (most recent call last):
  File "/usr/local/Plone5_ZEO/buildout-cache/eggs/ZODB3-3.10.7-py2.7-linux-x86_64.egg/ZODB/Connection.py", line 860, in setstate
    self._setstate(obj)
  File "/usr/local/Plone5_ZEO/buildout-cache/eggs/ZODB3-3.10.7-py2.7-linux-x86_64.egg/ZODB/Connection.py", line 914, in _setstate
    self._reader.setGhostState(obj, p)
  File "/usr/local/Plone5_ZEO/buildout-cache/eggs/ZODB3-3.10.7-py2.7-linux-x86_64.egg/ZODB/serialize.py", line 613, in setGhostState
    obj.__setstate__(state)
  File "/usr/local/Plone5_ZEO/buildout-cache/eggs/zope.component-3.9.5-py2.7.egg/zope/component/persistentregistry.py", line 40, in __setstate__
    self._createLookup()
  File "/usr/local/Plone5_ZEO/buildout-cache/eggs/zope.interface-3.6.7-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 91, in _createLookup
    self._v_lookup = self.LookupClass(self)
  File "/usr/local/Plone5_ZEO/buildout-cache/eggs/zope.interface-3.6.7-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 439, in __init__
    self.init_extendors()
  File "/usr/local/Plone5_ZEO/buildout-cache/eggs/zope.interface-3.6.7-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 476, in init_extendors
    self.add_extendor(p)
  File "/usr/local/Plone5_ZEO/buildout-cache/eggs/zope.interface-3.6.7-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 480, in add_extendor
    for i in provided.__iro__:
AttributeError: type object 'ITaxonomy' has no attribute '__iro__'

@petschki
Copy link
Member Author

petschki commented Nov 6, 2019

u did install this PR and hit "install/uninstall" in the addon controlpanel? otherwise the persistent utilities aren't unregistered cleanly ...

@mtrebron
Copy link

mtrebron commented Nov 6, 2019

Yes I did, in fact was going to add this to my comment above:

2019-11-06 17:39:57 WARNING collective.taxonomy Duplicate key entry: u'\u241f\u241f'
2019-11-06 17:39:57 WARNING collective.taxonomy Duplicate key entry: u'\u241f\u241f\u241f'
2019-11-06 17:42:31 INFO taxonomy.controlpanel Importing document into 'collective.taxonomy.my_taxonomy' (purge: false)
2019-11-06 17:44:22 INFO Products.GenericSetup.tool Importing profile profile-collective.taxonomy:uninstall with dependency strategy upgrade.
2019-11-06 17:44:22 INFO Products.GenericSetup.tool Applying main profile profile-collective.taxonomy:uninstall
2019-11-06 17:44:22 INFO GenericSetup.rolemap Role / permission map imported.
2019-11-06 17:44:22 INFO GenericSetup.controlpanel Control panel imported.
2019-11-06 17:44:22 INFO GenericSetup.browserlayer Browser layers imported
2019-11-06 17:44:22 INFO GenericSetup.plone.app.registry Removed record collective.taxonomy.interfaces.ITaxonomySettings.taxonomies.

@petschki petschki merged commit be843d9 into master Nov 25, 2019
@petschki petschki deleted the petschki/issue-64 branch November 25, 2019 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Needs uninstall profile
3 participants