[Zope] Upgrade of Zope from 2.3.2 to 2.4

Gitte Wange gitte@mmmanager.org
Fri, 31 Aug 2001 14:19:22 +0200


On Friday 31 August 2001 14:07, Jens Vagelpohl wrote:
> the "Ambiguous name" error message has been discussed several times (-->
> see mailing list archives), you should contact the maintainers of the
> Etailer software package to update their software. just to recap, many
> products contain code like this:
>
>      manage = manage_main = DTMLFile('dtml/xyz.dtml', globals())
>
> under 2.4 this will produce an error message like...
>
> 2001-08-31T08:56:18 PROBLEM(100) Init Ambiguous name for method of
> Products.XYZ.Product.Product: "manage_main" != "manage"

Well I don't think that Adroid are developing on there public Etailer release 
anymore - but I'll just fix it myself :-)

> the very simple workaround is to add the following line:
>
>      manage_main._setName( 'manage_main' )
>
> *but*... the _setName method is only available in zope 2.4 and higher and
> will cause an AttributeError in prior versions. 

This is okay since we want all of our Zope installations to run 2.4.
I can just make a copy of the Etailer products dir and edit that one and put 
it in my Zope 2.4 installation.

> to make the product
> backwards compatible i suggest wrapping this call in a try/except, like so:
>
>      try:
>          manage_main._setName( 'manage_main' )
>      except AttributeError:
>          pass
>
> the second problem (python scripts need to be recompiled) has also been
> discussed before. right now there is no satisfactory workaround to
> visiting each one in the ZMI and hitting the "Edit" button.
>
> jens
>
> On Friday, August 31, 2001, at 04:54 , Gitte Wange wrote:
> > Hello,
> >
> > I have just upgraded our Zope server from version 2.3.2 to version 2.4
> > Now ... I get this traceback:
> > 2001-08-31T08:56:18 PROBLEM(100) Init Ambiguous name for method of
> > Products.Etailer.Product.Product: "manage_workspace" != "manage"
> > ------
> > 2001-08-31T08:56:18 PROBLEM(100) Init Ambiguous name for method of
> > Products.Etailer.Product.Product: "manage_workspace" != "manage_main"
> > ------
> > 2001-08-31T08:56:18 PROBLEM(100) Init Ambiguous name for method of
> > Products.Etailer.Category.Category: "manage_workspace" != "manage"
> > ------
> > 2001-08-31T08:56:18 PROBLEM(100) Init Ambiguous name for method of
> > Products.Etailer.Category.Category: "manage_workspace" != "manage_main"
> > ------
> > 2001-08-31T08:56:18 PROBLEM(100) Init Ambiguous name for method of
> > Products.Etailer.Order.Order: "view" != "manage_workspace"
> > ------
> > 2001-08-31T08:56:18 PROBLEM(100) Init Ambiguous name for method of
> > Products.Etailer.Order.Order: "view" != "index_html"
> > ------
> > 2001-08-31T08:56:18 PROBLEM(100) Init Ambiguous name for method of
> > Products.Etailer.Order.Order: "view" != "manage"
> > ------
> > 2001-08-31T08:56:18 PROBLEM(100) Init Ambiguous name for method of
> > Products.Etailer.Order.Order: "view" != "manage_main"
> > ------
> > 2001-08-31T08:56:18 PROBLEM(100) Init Ambiguous name for method of
> > Products.Etailer.EmailList.EmailList: "manage" != "manage_main"
> > ------
> > 2001-08-31T08:56:18 PROBLEM(100) Init Ambiguous name for method of
> > Products.Etailer.OrderManager.OrderManager: "view" != "index_html"
> > ------
> > 2001-08-31T08:56:18 PROBLEM(100) Init Ambiguous name for method of
> > Products.Etailer.OrderManager.OrderManager: "manage" != "manage_main"
> > ------
> > 2001-08-31T08:56:18 PROBLEM(100) Init Ambiguous name for method of
> > Products.Etailer.Style.Style: "manage_editForm" != "manage"
> > ------
> > 2001-08-31T08:56:18 PROBLEM(100) Init Ambiguous name for method of
> > Products.Etailer.Style.Style: "manage_editForm" != "manage_main"
> > ------
> > 2001-08-31T08:56:18 PROBLEM(100) Init Ambiguous name for method of
> > Products.Etailer.StyleManager.StyleManager: "manage" != "manage_main"
> > ------
> > 2001-08-31T08:56:18 PROBLEM(100) Init Ambiguous name for method of
> > Products.Etailer.Etailer.Etailer: "manage_main" != "manage_folder"
> > ------
> > 2001-08-31T08:56:18 PROBLEM(100) Init Ambiguous name for method of
> > Products.Etailer.Etailer.Etailer: "manage_workspace" != "manage"
> > ------
> > 2001-08-31T08:56:18 PROBLEM(100) Init Ambiguous name for method of
> > Products.Etailer.Etailer.Etailer: "manage_workspace" != "manage_main"
> >
> > Guess it's because the products manage pages are named wrong ???
> > Will it help to change the code (so that in e.g.
> > Product.Etailer.Etailer.Etailer I will change the "manage_workspace" to
> > "manage_main") ???
> >
> > There are also another problem:
> >
> > 2001-08-31T08:57:00 PROBLEM(100) Script (Python) Object "SearchableText"
> > needs to be recompiled.
> > ------
> > 2001-08-31T08:57:00 PROBLEM(100) Script (Python) Object "getVoteStr"
> > needs to
> > be recompiled.
> > ------
> > 2001-08-31T08:57:00 PROBLEM(100) Script (Python) Object
> > "addArchiveClassPy"
> > needs to be recompiled.
> > ------
> > 2001-08-31T08:57:00 PROBLEM(100) Script (Python) Object "addRealServerPy"
> > needs to be recompiled.
> > ------
> > 2001-08-31T08:57:00 PROBLEM(100) Script (Python) Object "folder_con"
> > needs to
> > be recompiled.
> > ------
> > 2001-08-31T08:57:00 PROBLEM(100) Script (Python) Object
> > "addPortalClassPy" needs to be recompiled.
> > ------
> > 2001-08-31T08:57:00 PROBLEM(100) Script (Python) Object "SearchableText"
> > needs to be recompiled.
> > ------
> > 2001-08-31T08:57:00 PROBLEM(100) Script (Python) Object "getVoteStr"
> > needs to
> > be recompiled.
> > ------
> > 2001-08-31T08:57:00 PROBLEM(100) Script (Python) Object "SearchableText"
> > needs to be recompiled.
> > ------
> > 2001-08-31T08:57:00 PROBLEM(100) Script (Python) Object "getVoteStr"
> > needs to
> > be recompiled.
> >
> > Recompiled ???
> > How do I recompile a Zope Python Script ??
> >
> > Regards,
> > Gitte Wange
> >
> > _______________________________________________
> > Zope maillist  -  Zope@zope.org
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )