collective / collective.contact.core

part of the collective.contact.* suite that provides a directory where you create persons, organizations, sub-organizations and positions
https://github.com/collective/collective.contact.demo
6 stars 10 forks source link

ImportError: No module named CMFDefault.utils #33

Closed wwiras closed 7 years ago

wwiras commented 7 years ago

I got this error when try to starting my plone through bin/plonectl fg

from Products.CMFDefault.utils import checkEmailAddress ZopeXMLConfigurationError: File "/home/jpnps/pljpnps/buildout-cache/eggs/plone.app.z3cform-1.2.1-py2.7.egg/plone/app/z3cform/configure.zcml", line 10.2-10.41 ZopeXMLConfigurationError: File "/home/jpnps/pljpnps/buildout-cache/eggs/plone.app.widgets-2.0.6-py2.7.egg/plone/app/widgets/configure.zcml", line 12.2-12.41 ZopeXMLConfigurationError: File "/home/jpnps/pljpnps/buildout-cache/eggs/Products.CMFPlone-5.0.6rc1-py2.7.egg/Products/CMFPlone/configure.zcml", line 108.4-112.10 ZopeXMLConfigurationError: File "/home/jpnps/pljpnps/buildout-cache/eggs/collective.contact.core-1.11-py2.7.egg/collective/contact/core/configure.zcml", line 13.2-13.27 ImportError: No module named CMFDefault.utils

vincentfretin commented 7 years ago

Which version of Plone are you using? I know the Products.CMFDefault dependency was removed in a certain Plone version, but I don't remember which version. A quick fix here is to add Products.CMFDefault in your buildout to have the import working.

A correct fix would be to remove the Products.CMFDefault dependency in collective.contact.core, copy and paste the checkEmailAddress validator in collective.contact.core. A PR to do it would be much appreciated.

vincentfretin commented 7 years ago

Ok, I see 5.0.6rc1 in your traceback.

vincentfretin commented 7 years ago

There is no collective.contact.core release for Plone 5 yet. You may look at the plone5 branch if you want to test it on Plone 5. @agitator is the one mainly working on it.

agitator commented 7 years ago

yes, fixed the checkEmailAddress with https://github.com/collective/collective.contact.core/commit/b0119b1744fa01eae531b8c05a23690ea1514425 within the plone5 branch, but that's still work in progress

tkimnguyen commented 7 years ago

@agitator don't forget to add the new classifiers in https://github.com/collective/collective.contact.core/blob/plone5/setup.py 'Framework :: Plone :: 5.0' and maybe 'Framework :: Plone :: 5.1'

tkimnguyen commented 7 years ago

Heck, done in https://github.com/collective/collective.contact.core/pull/34

vincentfretin commented 7 years ago

I guess I can close the issue. The work in progress for Plone 5 is in the plone5 branch.