[Zope-PTK] Problem upgrading an existing Portalsite to PTK 0.9

Tres Seaver tseaver@digicool.com
Wed, 18 Oct 2000 09:24:36 -0400


Joachim Schmitz wrote:
> 
> Hi,
> 
> I did an cvs update to retrieve the new PTK version from CVS into my working
> portal, I also deleted and imported DemoPortal and Wizard in the products.
> I restarted Zope, and tried to access my Portal, I got:
> 
> ....
> 
> File /usr/local/Zope-2.2.1/lib/python/DocumentTemplate/DT_Util.py, line
> 337, in eval
> (Object: _.hasattr(this(),'Date') and Date().isFuture())
> (Info: this)File <string>, line 0, in ?
> File /usr/local/Zope-2.2.1/lib/python/DocumentTemplate/DT_Util.py, line
> 129, in careful_getattr
> AttributeError: 'string' object has no attribute 'isFuture'
> 
> I found that in standard_html_header of the new version the second line
> changed from:
> 
> <dtml-if "_.hasattr(this(),'Date') and and Date().isFuture() )">
> to
> <dtml-if "_.hasattr(this(),'isEffective') and not isEffective( ZopeTime() )">
> 
> what is the correct way of upgrading an existing PTK-instance to a new
> version?

This is a good question -- you didn't do anything wrong.  the issue
is a hard one, in that the deployed portal contains code which assumes
an older API for content objects.  If you have not modified the deployed
portal's DTML yourself (that is, any of the DTML Methods which are in
the
portal root), you can apply the fix you describe manually, and then use
the "Reconfigure Portal" action to refresh the remainder of the DTML
from
the versions stored in the product.

Sorry for any confusion.  We do need to work out better ways to manage
changes to through-the-web code/configuration, as your question points
out.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@digicool.com
Digital Creations     "Zope Dealers"       http://www.zope.org