Fixing non-buildout to buildout migration errors

How to fix “AttributeError: _v_transform” view errors on migrated Plone sites.

After migrating a test instance of a non-buildout Plone v3.1.7 site to a new buildout installation of Plone 3.2.1, None of my Page (or Document) objects, including the home page of the site, were viewable.  All view attempts triggered Python tracebacks like the following:

Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module zope.tales.tales, line 696, in evaluate
  Module Products.Archetypes.Field, line 1391, in get
  Module Products.Archetypes.BaseUnit, line 100, in transform
  Module Products.PortalTransforms.TransformEngine, line 181, in convertTo
  Module Products.PortalTransforms.chain, line 51, in convert
  Module Products.PortalTransforms.Transform, line 192, in convert
AttributeError: _v_transform

See a more detailed error example here.

As the traceback says, this is clearly a problem with PortalTransforms.  A post on the PSU WebLion wiki claimed this error could be solved by deleting any “broken” transformations in the Contents and Policy tabs of the ZMI portal_transforms tool.  While this may be worth trying, I had no transformations marked as “broken” in my case.

Luckily, Raphael Ritz offered some advice on transform tool errors after migration, and how to fix such problems:

  1. In the ZMI, navigate to /portal_setup, and click the Import tab.
  2. Under Select Profile or Snapshot, from the drop-down menu, select PortalTransforms.
  3. A new PortalTransforms setup entry will have been added to the list of many importable objects; in my case, it was added all the way down the list as #33, so you may have to search for yours.

    PloneTransforms import step

    PloneTransforms setup import step

    Once you find this PortalTransforms setup entry, select the check-box in front of it.

  4. At the bottom of the page,  leave Include Dependencies? selected, and then click Import selected steps.
    Import the new PloneTransforms setup step

    Import the new PloneTransforms setup step

    After a few seconds, you should receive a message to confirm that the step has been imported, and your page views should be viewable once again.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s