[Setup] Re: AT + mimetype related 2.0_final to 2.1.2 migration faliure

Daniel Dekany ddekany at freemail.hu
Thu Apr 20 22:56:50 UTC 2006


I have tracked it back as far as I can, but at the end I don't really
understand what I see:

The AT objects have fields defined in their schemas. Each AT field
value has a mimetype (the "mimetype" attribute of the BaseUnit). This
is a Products.MimetypesRegistry.MimeTypeItem object. Still, for some
reason:

    IMimetype.isImplementedBy(mimetype)

evaluates to false, and this leads to the error that aborts the
migration. Why does it not implement IMimetype? It's strange, because
the MimeTypeItem class has this line:

    __implements__ = (IMimetype, )

and mimetype above is a
Products.PortalTransforms.zope.MimeTypeItem.MimeTypeItem, which as far
as I understand is the same as
Products.MimetypesRegistry.MimeTypeItem, since in
PortalTransforms.__init__ I see:

     from Products.MimetypesRegistry import MimeTypeItem
     setattr(this_module, 'MimeTypeItem', MimeTypeItem)

     from Products.MimetypesRegistry import MimeTypeItem
     sys.modules['Products.PortalTransforms.zope.MimeTypeItem'] = MimeTypeItem

Still, if I print mimetype.__implements__, I get this:

    (<Interface webdav.EtagSupport.EtagBaseInterface at 407df26c>,)

but I have expected this (maybe wrongly...):

    (<Interface Products.MimetypesRegistry.interfaces.MimeTypeItem at xxxxxxxx>,)

What could be the problem?
    
-- 
Best regards,
 Daniel Dekany


Monday, February 13, 2006, 12:39:15 PM, Nick Davis wrote:

> Hi,
>    The traceback you posted may be significant. Or, if a secondary 
> symptom of something that went wrong earlier, it may not. So I would 
> first address some other possible root causes:
>
>    Going straight from 2.0_final to 2.1.2 seems to me quite a jump. I 
> doubt many people have done that all in one go, especially with custom
> AT-based products.
>
> You could try upgrading 2.0_final to 2.0.5,
> then perhaps individually upgrade AT from 1.2.5RC4 to 1.3.5
> then 2.0.5 to 2.1.2
>
> (all on, say, Zope 2.7.7).
>
> At each stage make sure the site is working properly.
>
> Its possible with what you did before, that although it says you got 
> from 2.0_final to 2.0.5 without errors, the site was left in a slightly
> messed-up state which then broke the further migration from 2.0.5 to 2.1.2.
>
> As for Mimetypes, we got Mimetypes-related errors after migration, and
> found when looking at Mimetypes registry through the ZMI, all the icons
> were broken. We uninstalled Mimetypes and reinstalled it and everything
> was OK. So you might need to do that. I don't know why. ;-)
>
> Hope that helps,
> Nick





More information about the Setup mailing list