[Setup] Migration problem 2.0.5->2.1.1: some Portal Folders not converted to ATFolder

Brian Place bdp at bdpnetworks.com
Mon Nov 21 17:14:30 UTC 2005


Hi All,

For what it's worth I seem to be having the exact same problem but this 
procedure did not seem to fix it.

               -Brian

Marcel Maré wrote:
> I'm having a problem with the migration of a fairly plain Plone 2.05 
> site to 2.1.1.
> I did the normal migration which went fine. Then I noticed that some 
> of the folders in the site are in accessible. It seems that their type 
> is Portal Folder (as shown in the ZMI) instead of ATFolder. I's a 
> mystery to me why some folders are OK and some are not. AFAICT they 
> were all created in the same way (TTW) but not at the same time.
>
> I've tried a lot of fixes, like reindexing before conversion, 
> rerunning the atct tool's migration for CMF objects. To no avail.
> Cutting and pasting in a new Plone site: same problem.
>
> It seems others have run into this problem. WIth the help of this list 
> (especially comments by Raphael Ritz) I've hacked together this script 
> because I had a lot of crappy folders:
>
>
> # Do a regular plone site migration
> # stop zope
>
> # run this script in a zope debug shell by
> # starting zope with:
> #    zopectl debug
>
>
> # get a handle on the site root
> mysite = app.pact
>
> # recursively collect the offending folders
> # since a catalog search does not find them
>
> nasty=[]
>
> def visit( this ):
>     if this.Type()=='Plone Folder':
>         print this.title_or_id()
>         nasty.append(this)
>     try:
>        dir = this.objectValues()
>        for item in dir:
>            visit(item)
>     except:
>        pass
>
> visit(mysite)
>
> # Repair the folders (thanks Raphael Ritz!)
> for i in nasty:
>     mysite.portal_types['CMF Folder']._finishConstruction(i)
>
>
> # save the changes
> import transaction
> transaction.commit()
>
> # exit the shell and start Zope normally
>
> Then I ran portal_atct ZMI:
> recatalog>recatalog CMF objects
> type migration>fix
> type migration>migrate
>
> I don't know if this is all necessary but it seems to work.
>
>
> Should a bug be filed in the Plone Collector?
>
>
> M.J. Maré
> WebToTheMax
>
>
>
>
>
> M.J. Maré
> WebToTheMax
>
> T +31-20-4 100 242
> F +31-20-4 100 243
> W www.webtothemax.com
> E mjmare at webtothemax.com
> J mjm at anywise.jabber.com
>
>
>
> _______________________________________________
> Setup mailing list
> Setup at lists.plone.org
> http://lists.plone.org/mailman/listinfo/setup



More information about the Setup mailing list