This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!
Project Description

Products.Plone3Cleaners: cleanup after migration from Plone 2.5 to 3

This package is a collection of browser views that you might need when migrating from Plone 2.5 to Plone 3. And actually, some of these can be handy also when not migration, like removing portal_factory items from the portal_catalog.

Add this package to the eggs of your buildout; no install inside Plone is needed.

Five local sites

Local sites from Products.Five have changed a lot since the Plone 2.5 days. They need migration. Products.Five offers the manage_site.html page; just add this to the url of your local site and click the ‘Migrate to Five.component’ button. You should try that first, but in my experience that usually does not work.

Note that a default Plone 2.5 Site does not use localsites, so if you have them, then they are from a third party product. If you see an error like this in the logs when looking at your Plone 3 Site you have a problem:

2009-06-23 12:30:17 ERROR ZPublisher BeforeTraverse: Error while invoking hook: "__local_site_hook__"
Traceback (most recent call last):
  File "/home/maurits/zopes/Zope-2.10.7-final-py2.4/lib/python/ZPublisher/BeforeTraverse.py", line 145, in __call__
    meth(*(container, request, None)[:args])
AttributeError: __call__

We have two browser views that help in fixing this:

  • @@find_local_sites: add this to the url of your Plone Site or of your Zope root. Click the submit button to find all objects with a problematic local site hook. Your zope instance log will have some details and the page will display links to the objects that need fixing. The links will point to our second browser view:
  • @@update_local_site: add this to the url of an object with an old local site hook that needs fixing. Likely, calling this will give that same AttributeError once or twice, but you can ignore that as you are about to fix it : click the ‘Migrate to Five.component’ button.

The object that had the old local site hook may need some fixes in the python code as well. Ask the developer of the product that this object is from. Note that a local site hook is not always the right solution; and this migration is not always enough. In a client project I got rid of one hook and used a simple attribute instead; a second hook worked fine after the above migration; a third hook needed a different migration.

portal_factory in portal_catalog

You have seen this: you write a catalog query, on one of the brains you do a brain.getObject() and this fails because the object was wrongly added to the catalog while being created and it was not cleaned up. Clean it up with @@factory_cleanup. You can choose to remove those portal_factory brains or remove any brain where getObject() fails. For various reasons this may find less or more items; certainly it takes a lot longer.

History of Products.Plone3Cleaners

1.1 (2009-08-19)

  • Added @@factory_cleanup to remove items with ‘/portal_factory/’ in their path from the portal_catalog. [maurits]

1.0 (2009-06-23)

  • Initial release. [maurits]
Release History

Release History

1.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
Products.Plone3Cleaners-1.1.tar.gz (12.5 kB) Copy SHA256 Checksum SHA256 Source Aug 19, 2009

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting