Skip to content. | Skip to navigation

Sections
Personal tools
What is this?
Hi, my name is Tom Lazar and I'm a Plone and Zope developer based in Berlin, Germany and this is my personal and professional (no big difference, really...) website.
 

Upgrading to Zope 2.8.x

Filed Under:

From the RTFM-Department

When I started playing around with Plone 2.1 a couple of weeks ago I also tried using Zope 2.8.1 but encountered too many errors with my migrated Plone 2.0.x instances which disappeared when I did the same using ye' good ol' 2.7.7 - from which I (falsely) concluded, that Plone 2.1 just didn't really work with 2.8.1 regardless of what the requirements say.

In fact, all you need to do is to first update your catalogs i.e.

  1. install Zope 2.8.1 and Plone 2.1
  2. copy the Data.fs from your 2.7.x instance
  3. update the catalog
  4. migrate your Plone instance

Regarding step 3 it's advisable to RTFM (more precisely, the doc/FAQ.txt inside the Zope 2.8.1 directory):

       To perform the migration:

- go to the ZMI

- click on your ZCatalog instance (or portal_catalog inside
your CMF or Plone instance)

- you will get an "AttributeError, _length"...don't panic

- call the "manage_convertIndexes" method of the ZCatalog
(by replacing the "manage_main" part of the URL with
"manage_convertIndexes")

- depending on the size of your ZCatalog the migration may
take a while

- after the conversion a message will appear: "Indexes
converted and reindexed"

While I'm not going to rush updating my existing 2.1/2.7.7 production sites (there's nothing really wrong per se with 2.7.7!) I am confident enough to use 2.8.1 for all new instances from now on - and now you can be too ;-)

Thanks

Posted by David G at Sep 12, 2005 10:48 PM

Thank you for your interestingly smooth geek-talk on Zope/Plone/Mac. It's way out of my expertise--I'm a middle school sci teacher--and I'm trying to get a new 2.1 plone/Zope 2.8.1/MacPython 2.4.1 to happen on my OS X 10.3.9 machine. I'm going to use this with my classes. Sometimes help docs are not that helpful and comments from blogs are better. Anything else you post on the topic I will appreciate. -David

If you still have problems, try this...

Posted by Tristan Roddis at Sep 26, 2005 02:41 PM

As you seem to be the top Google result for the _length problem, I thought I might was well add my findings. When I tried this, I got the indexes updated message, but still encountered the _length problem if I tried to update or clear the catalog (using the Advanced tab in the ZMI.

I eventually solved this by calling the migrate__len__() method of the underlying Catalog object directly from within a Zope debug session. I.e by executing commands as follows (icons is the name of my Plone site):

>>> app.icons.portal_catalog._catalog.__dict__.keys() [paths, _v_result_class, names, uids, _v_brains, schema, data, __len__, 'indexes'] <-- n.b. no _length attribute here! >>> app.icons.portal_catalog._catalog.migrate__len__() <-- this moves __len__ to _length >>> app.icons.portal_catalog._catalog.__dict__.keys() [paths, _v_result_class, names, uids, _length, _v_brains, schema, data, 'indexes'] <-- woo! now we have the elusive _length attribute where we want it >>> get_transaction().commit() <-- this makes sure your changes are saved to the ZODB

Hope that helps someone...

-T.