Skip to content

Commit

Permalink
provide cmfdefault stubs for migration old Plone sites
Browse files Browse the repository at this point in the history
  • Loading branch information
tomgross committed Jun 27, 2015
1 parent 40fc30b commit 3f3324d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
15 changes: 14 additions & 1 deletion plone/app/upgrade/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,19 @@ def getNonInstallableProducts(self):
from Products.ATContentTypes.tool import metadata
alias_module('Products.CMFPlone.MetadataTool', metadata)

try:
import Products.CMFDefault.MetadataTool
Products.CMFDefault.MetadataTool # pyflakes
except ImportError:
from Products.ATContentTypes.tool import metadata
sys.modules['Products.CMFDefault.MetadataTool'] = metadata

try:
import Products.CMFDefault.SyndicationInfo
Products.CMFDefault.SyndicationInfo # pyflakes
except ImportError:
sys.modules['Products.CMFDefault.SyndicationInfo'] = bbb

try:
from Products.PloneLanguageTool import interfaces
except ImportError:
Expand All @@ -130,4 +143,4 @@ def getNonInstallableProducts(self):
from Products.CMFPlacefulWorkflow.interfaces import portal_placeful_workflow
except:
from Products.CMFPlacefulWorkflow import interfaces
alias_module('Products.CMFPlacefulWorkflow.interfaces.portal_placeful_workflow', interfaces)
alias_module('Products.CMFPlacefulWorkflow.interfaces.portal_placeful_workflow', interfaces)
6 changes: 6 additions & 0 deletions plone/app/upgrade/bbb.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
DiscussionTool = SimpleItem
InterfaceTool = SimpleItem
SyndicationTool = SimpleItem
SyndicationInfo = SimpleItem
UndoTool = SimpleItem
TinyMCE = SimpleItem

Expand Down Expand Up @@ -64,3 +65,8 @@ def removeActionIcon(self, category, action_id):
icons.remove(icon)
del self._lookup[(category, action_id)]
self._icons = tuple(icons)

# BBB from CMFDefault
class SyndicationInformation(SimpleItem):
id='syndication_information'
meta_type='SyndicationInformation'

0 comments on commit 3f3324d

Please sign in to comment.