Relive the Original Zope
Zope 2

Relive the Original Zope

by Kevin — published Oct 20, 2026

I have taken the time to convert the Examples.zexp which shipped with early versions of Zope 2.x to modern Zope 6!

Well, I'm sure this isn't something anyone wanted, nor was expecting to ever see!  However, I found this a rather interesting learning experience, as while the original examples were mostly compatible, which actually surprised me, there were some changes that were needed.  In my other post I went on ranting on how I left Python 3.x awhile back due to some of my code needing to be rewritten potentially, all the while, code from Zope 2.x running in Python 2.2, was able to run almost with no issues on modern Zope 6 on Python 3.13.  I thought there were going to be a lot of issues, but there were only a few, which I will be talking about in this post here.

Screenshot of Zope 2.5.1 running in Internet Explorer 5.

I exported this from my current Zope 6 installation here, so if you are running the exact same version as me, then it might just import in your Zope instance: Examples.zexp

The first example, Automatic Navigation Devices worked flawlessly, there was zero changes that were needed to either the Page Templates or the Python Scripts.

The second example, Guest Book, required a bit of changes to work.  As the bobobase_modification_time is no longer a part of modern Zope, this needed to be replaced with a custom property instead.  I needed to make a modification to both the Page Template which renders the date, and then the addEntry Python script with the follow:

entry.manage_addProperty('post_date', DateTime().strftime('%Y/%m/%d'), 'string')

The other issue with the Guest Book was that when creating a file, it expects bytes, whereas the original code just passed in the raw comments string.  Python 3 changed a lot of string handling stuff, which is where a lot of my personal Python 2 code broke, as I used strings a lot, and because of Python 3, a lot of these strings would need to be now wrapped in bytes(), as seen here:

entries_folder.manage_addProduct['OFSP'].manage_addFile(id, title="", content_type="text/plain", file=bytes(comments, 'utf-8'))

The third example, File Library, also had an issue with the bobobase_modification_time being absent, and so it needed to be swapped out for a property as well:

entry=getattr(container.Files, file.filename)
entry.manage_addProperty('post_date', DateTime(), 'date')

The forth example, Shopping Cart, the Page Template and code work perfectly, except that sessions aren't enabled by default on modern Zope 6 or Plone in their default installations.  This required me to install some additional Products, and do some extract configuration in order to enable again.

Conclusion

Overall, this was actually a really fun learning experience.  Because these examples are still sort of relevant in that both Page Templates and the API are roughly the same as modern Zope 6, I can actually use what I learned through this.  Currently, the only one which can persist data at the time of this writing is the Guest Book, if you try to upload a file via the File Library, you will receive a request for authentication, and then an error if the box is cancelled.  The Navigation and Shopping Cart examples fully work without persisting any data on the server.