Migration Plone 4 to 5 issue

I have a running Plone 4.3.11 instance with some extensions like Products.windowZ==1.5 and collective.captchacontactinfo = 1.2.1. I installed a new Plone instance based on Plone-5.0.6-UnifiedInstaller-r1.tgz and copied var/blobstorage and var/filestorage. When I start up the instance in the foreground, I get this error:

>     ZopeXMLConfigurationError: File "/usr/local/Plone5/buildout-cache/eggs/Products.ATContentTypes-2.2.13-py2.7.egg/Products/ATContentTypes/configure.zcml", line 18.2-18.44
>     ZopeXMLConfigurationError: File "/usr/local/Plone5/buildout-cache/eggs/plone.app.collection-1.1.6-py2.7.egg/plone/app/collection/configure.zcml", line 9.2-9.45
>     ZopeXMLConfigurationError: File "/usr/local/Plone5/buildout-cache/eggs/plone.app.querystring-1.3.15-py2.7.egg/plone/app/querystring/configure.zcml", line 11.2-11.42
>     ZopeXMLConfigurationError: File "/usr/local/Plone5/buildout-cache/eggs/plone.app.registry-1.3.12-py2.7.egg/plone/app/registry/configure.zcml", line 12.4-12.34
>     ZopeXMLConfigurationError: File "/usr/local/Plone5/buildout-cache/eggs/plone.app.registry-1.3.12-py2.7.egg/plone/app/registry/browser/configure.zcml", line 6.4-6.43
>     ZopeXMLConfigurationError: File "/usr/local/Plone5/buildout-cache/eggs/plone.app.z3cform-1.2.1-py2.7.egg/plone/app/z3cform/configure.zcml", line 10.2-10.41
>     ZopeXMLConfigurationError: File "/usr/local/Plone5/buildout-cache/eggs/plone.app.widgets-2.0.6-py2.7.egg/plone/app/widgets/configure.zcml", line 12.2-12.41
>     ZopeXMLConfigurationError: File "/usr/local/Plone5/buildout-cache/eggs/Products.CMFPlone-5.0.6-py2.7.egg/Products/CMFPlone/configure.zcml", line 108.4-112.10
>     ZopeXMLConfigurationError: File "/usr/local/Plone5/buildout-cache/eggs/collective.captchacontactinfo-1.2.1-py2.7.egg/collective/captchacontactinfo/configure.zcml", line 10.2-10.32
>     ZopeXMLConfigurationError: File "/usr/local/Plone5/buildout-cache/eggs/collective.captchacontactinfo-1.2.1-py2.7.egg/collective/captchacontactinfo/browser/configure.zcml", line 8.4-12.6
>     ImportError: No module named form

collective.captchacontactinfo's browser/configure.zcml is importing the browser/configlet.py file.
This file tries to import zope.formlib, which no longer is included with Plone 5.
See https://github.com/RedTurtle/collective.captchacontactinfo/blob/master/collective/captchacontactinfo/browser/configlet.py#L3

Try adding zope.formlib as a dependency.
Please file a bug with collective.captchacontactinfo regarding Plone 5 compatibility, and/or try upgrading that package to work with Plone 5.

I added zope.formlib to my eggs list in buildout.cfg. Still the same error. Will file a bug report.

For Zope2 you need five.formlib, not just zope.formlib. And you need to make sure its ZCML gets loaded, not just add it to the eggs.

(I think a bug report on collective.captchacontactinfo requesting that it declare its dependency on five.formlib would be appropriate.)

2 Likes