Monday, May 31, 2010

migrate-btrees to the rescue

I had some old folderish content from Plone 2.5 and when i tried to migrate this to Plone 4 it was not working correctly. I was getting

AttributeError: has_key

exceptions from Products.BTreeFolder. I also found this article describing this problem:

http://plone.org/documentation/error/nonetype-keys

but no clear solution.

It turns out that ATContentTypes 2.0 changes the ATFolder implementation to use BTreeFolder as the base class. Thankfully a migration view is provided called "migrate-btrees" that will migrate all the folderish items under the given path.

At the end I got a nice message in my log:

2010-05-31 22:23:35 INFO plone.app.folder.migration processed 3490 object(s) in 10.864s (10.640s cpu time)

No comments:

Post a Comment