Ticket #13200 (closed Bug: fixed)

Opened 4 years ago

Last modified 4 years ago

plone.app.discussions migration of comments failed

Reported by: juh Owned by:
Priority: minor Milestone: 4.x
Component: Upgrade/Migration Version: 4.2
Keywords: Cc:


I get this error when I run the migration script.

Traceback (innermost last):
  Module ZPublisher.Publish, line 126, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 46, in call_object
  Module plone.app.discussion.browser.migration, line 205, in __call__
  Module plone.app.discussion.browser.migration, line 124, in migrate_replies
AttributeError: 'NoneType' object has no attribute 'get'

The site is from 2003 so it might contain some very old comments. I migrated the site from 3.3.5 to 4.2

Change History

comment:1 Changed 4 years ago by kleist

  • Status changed from new to confirmed
  • Component changed from Unknown to Upgrade/Migration

comment:2 Changed 4 years ago by tkimnguyen

I ran into this bug while upgrading a Plone 3.3.5 site to Plone 4.2.1. The problem seems to be that old comments had no workflow assigned, whereas the migration code assumed that old comments had a non-empty workflow state. I'm attaching the patch that fixes the issue.

comment:3 Changed 4 years ago by tkimnguyen

Ah I see that  https://github.com/plone/plone.app.discussion trunk already contains this fix (assigns 'published' state to old comments that did not have a state of their own). Never mind.

comment:4 Changed 4 years ago by tkimnguyen

  • Status changed from confirmed to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.