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

@@atct_migrator fails with reserved content ids ("security", "mail", ...) #547

Open
laulaz opened this issue Mar 31, 2020 · 3 comments
Open

Comments

@laulaz
Copy link
Member

laulaz commented Mar 31, 2020

When migrating content, a traceback occurs if a content has "security" as id (migration works if the content is renamed before executing it) :

2020-03-31 16:50:15 ERROR Zope.SiteErrorLog 1585666215.010.0629797446984 http://localhost:8080/Plone/@@atct_migrator
Traceback (innermost last):
  Module ZServer.ZPublisher.Publish, line 144, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZServer.ZPublisher.Publish, line 44, in call_object
  Module z3c.form.form, line 233, in __call__
  Module z3c.form.form, line 228, in update
  Module plone.app.z3cform.csrf, line 22, in execute
  Module z3c.form.action, line 98, in execute
  Module z3c.form.button, line 315, in __call__
  Module z3c.form.button, line 170, in __call__
  Module plone.app.contenttypes.migration.browser, line 362, in handle_migrate
  Module plone.app.contenttypes.migration.browser, line 196, in __call__
  Module plone.app.contenttypes.migration.migration, line 355, in migrate_folders
  Module plone.app.contenttypes.migration.migration, line 54, in migrate
  Module Products.contentmigration.basemigrator.walker, line 146, in go
  Module Products.contentmigration.basemigrator.walker, line 225, in migrate
MigrationError: MigrationError for obj at /Plone/project/security (Folder -> Folder):
Traceback (most recent call last):
  File "/Users/plone/.buildout/eggs/Products.contentmigration-2.2.0-py2.7.egg/Products/contentmigration/basemigrator/walker.py", line 194, in migrate
    migrator.migrate()
  File "/Users/plone/.buildout/eggs/Products.contentmigration-2.2.0-py2.7.egg/Products/contentmigration/basemigrator/migrator.py", line 214, in migrate
    self.renameOld()
  File "/Users/plone/.buildout/eggs/Products.contentmigration-2.2.0-py2.7.egg/Products/contentmigration/basemigrator/migrator.py", line 481, in renameOld
    unrestricted_rename(self.parent, self.orig_id, self.old_id)
  File "/Users/plone/.buildout/eggs/Products.contentmigration-2.2.0-py2.7.egg/Products/contentmigration/common.py", line 113, in unrestricted_rename
    self._delObject(id)
  File "/Users/plone/.buildout/eggs/Products.BTreeFolder2-4.2-py2.7.egg/Products/BTreeFolder2/BTreeFolder2.py", line 485, in _delObject
    notify(ObjectRemovedEvent(ob, self, id))
  File "/Users/plone/.buildout/eggs/zope.event-4.4-py2.7.egg/zope/event/__init__.py", line 32, in notify
    subscriber(event)
  File "/Users/plone/.buildout/eggs/zope.component-4.5-py2.7.egg/zope/component/event.py", line 27, in dispatch
    component_subscribers(event, None)
  File "/Users/plone/.buildout/eggs/zope.component-4.5-py2.7.egg/zope/component/_api.py", line 124, in subscribers
    return sitemanager.subscribers(objects, interface)
  File "/Users/plone/.buildout/eggs/zope.interface-4.7.2-py2.7-macosx-10.13-x86_64.egg/zope/interface/registry.py", line 442, in subscribers
    return self.adapters.subscribers(objects, provided)
  File "/Users/plone/.buildout/eggs/zope.interface-4.7.2-py2.7-macosx-10.13-x86_64.egg/zope/interface/adapter.py", line 611, in subscribers
    subscription(*objects)
  File "/Users/plone/.buildout/eggs/zope.component-4.5-py2.7.egg/zope/component/event.py", line 36, in objectEventNotify
    component_subscribers((event.object, event), None)
  File "/Users/plone/.buildout/eggs/zope.component-4.5-py2.7.egg/zope/component/_api.py", line 124, in subscribers
    return sitemanager.subscribers(objects, interface)
  File "/Users/plone/.buildout/eggs/zope.interface-4.7.2-py2.7-macosx-10.13-x86_64.egg/zope/interface/registry.py", line 442, in subscribers
    return self.adapters.subscribers(objects, provided)
  File "/Users/plone/.buildout/eggs/zope.interface-4.7.2-py2.7-macosx-10.13-x86_64.egg/zope/interface/adapter.py", line 611, in subscribers
    subscription(*objects)
  File "/Users/plone/.buildout/eggs/five.intid-1.2.4-py2.7.egg/five/intid/intid.py", line 127, in removeIntIdSubscriber
    notify(IntIdRemovedEvent(ob, event))
  File "/Users/plone/.buildout/eggs/zope.event-4.4-py2.7.egg/zope/event/__init__.py", line 32, in notify
    subscriber(event)
  File "/Users/plone/.buildout/eggs/zope.component-4.5-py2.7.egg/zope/component/event.py", line 27, in dispatch
    component_subscribers(event, None)
  File "/Users/plone/.buildout/eggs/zope.component-4.5-py2.7.egg/zope/component/_api.py", line 124, in subscribers
    return sitemanager.subscribers(objects, interface)
  File "/Users/plone/.buildout/eggs/zope.interface-4.7.2-py2.7-macosx-10.13-x86_64.egg/zope/interface/registry.py", line 442, in subscribers
    return self.adapters.subscribers(objects, provided)
  File "/Users/plone/.buildout/eggs/zope.interface-4.7.2-py2.7-macosx-10.13-x86_64.egg/zope/interface/adapter.py", line 611, in subscribers
    subscription(*objects)
  File "/Users/plone/.buildout/eggs/z3c.relationfield-0.9.0-py2.7.egg/z3c/relationfield/event.py", line 111, in breakRelations
    rel.broken(rel.to_path)
  File "/Users/plone/.buildout/eggs/z3c.relationfield-0.9.0-py2.7.egg/z3c/relationfield/relation.py", line 53, in to_path
    if self.to_object is None:
  File "/Users/plone/.buildout/eggs/z3c.relationfield-0.9.0-py2.7.egg/z3c/relationfield/relation.py", line 49, in to_object
    return _object(self.to_id)
  File "/Users/plone/.buildout/eggs/z3c.relationfield-0.9.0-py2.7.egg/z3c/relationfield/relation.py", line 126, in _object
    return intids.getObject(id)
  File "/Users/plone/.buildout/eggs/zope.intid-4.3.0-py2.7.egg/zope/intid/__init__.py", line 85, in getObject
    return self.refs[id]()
  File "/Users/plone/.buildout/eggs/five.intid-1.2.4-py2.7.egg/five/intid/keyreference.py", line 154, in __call__
    return self.wrapped_object
  File "/Users/plone/.buildout/eggs/five.intid-1.2.4-py2.7.egg/five/intid/keyreference.py", line 149, in wrapped_object
    new_obj = aq_base(item).__of__(new_obj)
AttributeError: 'SecurityControlpanel' object has no attribute '__of__'
@laulaz laulaz changed the title @@atct_migrator fails with content id "security" @@atct_migrator fails with reserved content ids ("security", "mail", ...) Mar 31, 2020
@laulaz
Copy link
Member Author

laulaz commented Mar 31, 2020

Same with "mail" content :

AttributeError: 'MailControlpanel' object has no attribute '__of__'

@dest81
Copy link

dest81 commented Sep 14, 2020

@laulaz have you solved the issue?
I think I had similar and it was conflict with plone.restapi adapters
If you uninstall plone.restapi during migration it could help but then after installing it again some links like /Plone/mail, /Plone/security might not be working

@laulaz
Copy link
Member Author

laulaz commented Sep 14, 2020

@dest81 we didn't try to fix the bug, as concerned contents needed to be renamed anyway ... sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants