Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install products.plone3cleaners

How to install Products.Plone3Cleaners

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install products.plone3cleaners
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.1 Available View build log
Windows (64-bit)
1.1 Available View build log
Mac OS X (10.5+)
1.1 Available View build log
Linux (32-bit)
1.1 Available View build log
Linux (64-bit)
1.1 Available View build log
 
Author
License
GPL
Dependencies
Lastest release
version 1.1 on Jan 5th, 2011

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:

System Message: WARNING/2 (<string>, line 27)

Literal block expected; none found.

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__

System Message: WARNING/2 (<string>, line 27); backlink

Inline emphasis start-string without end-string.

We have two browser views that help in fixing this:

  • @@find_local_sites: add this to the url of your Plone Site or of

System Message: WARNING/2 (<string>, line 36)

Bullet list ends without a blank line; unexpected unindent.

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

System Message: WARNING/2 (<string>, line 42)

Bullet list ends without a blank line; unexpected unindent.

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

System Message: WARNING/2 (<string>, line 75)

Bullet list ends without a blank line; unexpected unindent.

their path from the portal_catalog. [maurits]

1.0 (2009-06-23)
  • Initial release. [maurits]

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.