plone / plone.app.contenttypes

Dexterity-based content types for Plone
https://pypi.org/project/plone.app.contenttypes
14 stars 48 forks source link

Can not migrate default content on new 4.3.5 site - owner is None #230

Closed fulv closed 9 years ago

fulv commented 9 years ago

I have installed a brand-new Plone 4.3.5 site with plone.app.contenttypes = 1.1b4. When doing the migration of the default content, I get the following:

2015-05-28 01:00:03 INFO plone.app.contenttypes.migration.browser Start migrating 3 objects from ATFolder to Folder
2015-05-28 01:00:03 INFO plone.app.contenttypes.migration.migration Migrating /Plone/news
> /usr/local/plone-4.3/buildout-cache/eggs/Products.contentmigration-2.1.10-py2.7.egg/Products/contentmigration/basemigrator/migrator.py(303)migrate_localroles()
2015-05-28 01:04:11 ERROR ATCT.migration Failed migration for object /Plone/news (Folder -> Folder)
Traceback (most recent call last):
  File "/usr/local/plone-4.3/buildout-cache/eggs/Products.contentmigration-2.1.10-py2.7.egg/Products/contentmigration/basemigrator/walker.py", line 192, in migrate
    migrator.migrate()
  File "/usr/local/plone-4.3/buildout-cache/eggs/Products.contentmigration-2.1.10-py2.7.egg/Products/contentmigration/basemigrator/migrator.py", line 220, in migrate
    method()
  File "/usr/local/plone-4.3/buildout-cache/eggs/Products.contentmigration-2.1.10-py2.7.egg/Products/contentmigration/basemigrator/migrator.py", line 303, in migrate_localroles
    self.new.manage_setLocalRoles(owner.getId(), ['Owner'])
AttributeError: 'NoneType' object has no attribute 'getId'
2015-05-28 01:04:11 ERROR ATCT.migration FATAL: Migration has failed, aborting transaction!
2015-05-28 01:04:11 ERROR Zope.SiteErrorLog 1432775051.840.893658511491 http://localhost:8080/Plone/@@atct_migrator
Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module plone.z3cform.layout, line 66, in __call__
  Module plone.z3cform.layout, line 50, in update
  Module z3c.form.form, line 213, in update
  Module plone.app.z3cform.csrf, line 21, 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 355, in handle_migrate
  Module plone.app.contenttypes.migration.browser, line 197, in __call__
  Module plone.app.contenttypes.migration.migration, line 512, in migrate_folders
  Module plone.app.contenttypes.migration.migration, line 55, in migrate
  Module Products.contentmigration.basemigrator.walker, line 144, in go
  Module Products.contentmigration.basemigrator.walker, line 223, in migrate
MigrationError: MigrationError for obj at /Plone/news (Folder -> Folder):
Traceback (most recent call last):
  File "/usr/local/plone-4.3/buildout-cache/eggs/Products.contentmigration-2.1.10-py2.7.egg/Products/contentmigration/basemigrator/walker.py", line 192, in migrate
    migrator.migrate()
  File "/usr/local/plone-4.3/buildout-cache/eggs/Products.contentmigration-2.1.10-py2.7.egg/Products/contentmigration/basemigrator/migrator.py", line 220, in migrate
    method()
  File "/usr/local/plone-4.3/buildout-cache/eggs/Products.contentmigration-2.1.10-py2.7.egg/Products/contentmigration/basemigrator/migrator.py", line 303, in migrate_localroles
    self.new.manage_setLocalRoles(owner.getId(), ['Owner'])
AttributeError: 'NoneType' object has no attribute 'getId'
pbauer commented 9 years ago

@fulv I cannot reproduce the issue. I create new site using the buildout of plone.app.contenttypes and he migration worked. Will repeat the test with the unified installer for 4.3.5. Which buildout did you use?

pbauer commented 9 years ago

@fulv same is true for the unified installer: the migration works. I pinned plone.app.event like this to not get p.a.widgets:

plone.app.event = <= 1.1.999
fulv commented 9 years ago

I used the ansible buildout, but I did have widgets. I'll try again without.

On Fri, 29 May 2015 03:23 Philip Bauer notifications@github.com wrote:

@fulv https://github.com/fulv same is true for the unified installer: the migration works. I pinned plone.app.event like this to not get p.a.widgets:

plone.app.event = <= 1.1.999

Reply to this email directly or view it on GitHub https://github.com/plone/plone.app.contenttypes/issues/230#issuecomment-106766777 .

pbauer commented 9 years ago

@fulv can we close this or could you reproduce it?

fulv commented 9 years ago

I tried it again on 4.3.6, and could not reproduce (even though I had p.a.widgets, because I forgot to pin plone.app.event = <= 1.1.999).