plone.app.multilingual/davisagli-AT-cleanup: avoid breaking Plone 5.1 when Archetypes is gone
Peter Holzer <jenkins-z4DKO/[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.cvs |
|---|---|
| Message-ID | <[email protected]> |
Repository: plone.app.multilingual Branch: refs/heads/davisagli-AT-cleanup Date: 2017-07-18T12:44:49+02:00 Author: David Glick (davisagli) <david-rmWH0PSicHxx67MzidHQgQC/[email protected]> Commit: https://github.com/plone/plone.app.multilingual/commit/fcd280f945a4f4ce97cc6450bc501b2a23764400 avoid breaking Plone 5.1 when Archetypes is gone Files changed: M CHANGES.rst M src/plone/app/multilingual/browser/helper_views.py diff --git a/CHANGES.rst b/CHANGES.rst index 0b9c62e6..4f13ba5a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -135,7 +135,7 @@ Bug fixes: Breaking changes: - Support for Archetypes content is only installed if you install `archetypes.multilingual. - For Archetypes support, there is a new ``archetypes`` ``extras_require``, which you can depend upon. + For Archetypes support, there is a new ``archetypes`` ``extras_require``, which you can depend upon. [davisagli] New features: diff --git a/src/plone/app/multilingual/browser/helper_views.py b/src/plone/app/multilingual/browser/helper_views.py index 34cd0a2f..e23e3e3c 100644 --- a/src/plone/app/multilingual/browser/helper_views.py +++ b/src/plone/app/multilingual/browser/helper_views.py @@ -27,13 +27,14 @@ from zope.publisher.interfaces import NotFound try: + # Archetypes installed from Products.ATContentTypes.interfaces.factory import IFactoryTool except ImportError: try: + # Plone 5.0 without Archetypes from Products.CMFPlone.interfaces.factory import IFactoryTool except ImportError: - # gone in Plone 5.1 w/o ATCT - + # Plone 5.1 without Archetypes class IFactoryTool(Interface): pass ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot