Ticket #5852 (closed Bug: wontfix)
Plone migration from 2.0.4 to 2.5 fails if ATCT 0.2-final with mxTidy was originally used
| Reported by: | agabriel | Owned by: | tiran |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.5.2 |
| Component: | Upgrade/Migration | Keywords: | ATCT, mxTidy |
| Cc: |
Description
Migrating (Plone Migration Tool) of Plone 2.0.4 to 2.5 fails if portal types are based on ATCT 0.2-final with mxTidy validator:
Error value: This object was originally created by a product that
is no longer installed. It cannot be updated.
(<TidyHtmlWithCleanupValidator at broken>)
The reason for the problem is that modulealiases.py of ATCT 1.1.1-final does not consider the old validators library name. A solution is to add also a module mapping for validators.py
Adding of following lines in validators.py and modulealiases.py solve the problem:
# in validators.py after line 24
[..]
__old_name__ = 'Products.ATContentTypes.Validators'
[..]
and
# in modulealiases.py after line 41 [..] from Products.ATContentTypes.lib import validators [..]
Products, traceback, plone migration results:
Old site products:
Zope 2.7.5, Plone 2.0.4, ATCT 0.2-final
Current products:
Zope 2.9.4, Plone 2.5, ATCT 1.1.1
Traceback:
<snip>
2006-10-06T18:10:41 ERROR Plone
Error type: exceptions.SystemError
------
2006-10-06T18:10:41 ERROR Plone
Error value: This object was originally created by a product that
is no longer installed. It cannot be updated.
(<TidyHtmlWithCleanupValidator at broken>)
------
2006-10-06T18:10:41 ERROR Plone
File "/var/lib/zope2.9/instance/unimr2/Products/CMFPlone/MigrationTool.py", line 299, in upgrade
newv, msgs = self._upgrade(newv)
------
2006-10-06T18:10:41 ERROR Plone
File "/var/lib/zope2.9/instance/unimr2/Products/CMFPlone/MigrationTool.py", line 396, in _upgrade
res = function(self.aq_parent)
------
2006-10-06T18:10:41 ERROR Plone
File "/var/lib/zope2.9/instance/unimr2/Products/CMFPlone/migrations/v2_1/alphas.py", line 69, in two05_alpha1
migrateToATCT10(portal, out)
------
2006-10-06T18:10:41 ERROR Plone
File "/var/lib/zope2.9/instance/unimr2/Products/CMFPlone/migrations/v2_1/alphas.py", line 299, in migrateToATCT10
transaction.savepoint(optimistic=True)
</snip>
Plone Migration Tool Results:
# Dry run selected.
# Starting the migration from version: 2.0.4
# Attempting to upgrade from: 2.0.4
# Upgrade to: 2.0.5-rc1, completed
# Attempting to upgrade from: 2.0.5-rc1
# Upgrade to: 2.0.5-rc2, completed
# Attempting to upgrade from: 2.0.5-rc2
# Renamed Folder 'properties' tab to 'edit'.
# Added 'folderlisting' action to Topics.
# Interchanged 'edit' and 'sharing' tabs.
# Upgrade to: 2.0.5, completed
# Attempting to upgrade from: 2.0.5
# Upgrade aborted
# Error type: exceptions.SystemError
# Error value: This object was originally created by a product that is no longer installed. It cannot be updated. (<TidyHtmlWithCleanupValidator at broken>)
# File "/var/lib/zope2.9/instance/unimr2/Products/CMFPlone/MigrationTool.py", line 299, in upgrade newv, msgs = self._upgrade(newv)
# File "/var/lib/zope2.9/instance/unimr2/Products/CMFPlone/MigrationTool.py", line 396, in _upgrade res = function(self.aq_parent)
# File "/var/lib/zope2.9/instance/unimr2/Products/CMFPlone/migrations/v2_1/alphas.py", line 69, in two05_alpha1 migrateToATCT10(portal, out)
# File "/var/lib/zope2.9/instance/unimr2/Products/CMFPlone/migrations/v2_1/alphas.py", line 299, in migrateToATCT10 transaction.savepoint(optimistic=True)
# File "/usr/lib/zope2.9/lib/python/transaction/_manager.py", line 110, in savepoint return self.get().savepoint(optimistic)
# File "/usr/lib/zope2.9/lib/python/transaction/_transaction.py", line 295, in savepoint self._saveCommitishError() # reraises!
# File "/usr/lib/zope2.9/lib/python/transaction/_transaction.py", line 292, in savepoint savepoint = Savepoint(self, optimistic, *self._resources)
# File "/usr/lib/zope2.9/lib/python/transaction/_transaction.py", line 675, in __init__ savepoint = savepoint()
# File "/usr/lib/zope2.9/lib/python/ZODB/Connection.py", line 1012, in savepoint self._commit(None)
# File "/usr/lib/zope2.9/lib/python/ZODB/Connection.py", line 526, in _commit self._store_objects(ObjectWriter(obj), transaction)
# File "/usr/lib/zope2.9/lib/python/ZODB/Connection.py", line 553, in _store_objects p = writer.serialize(obj) # This calls __getstate__ of obj
# File "/usr/lib/zope2.9/lib/python/ZODB/serialize.py", line 407, in serialize return self._dump(meta, obj.__getstate__())
# File "/usr/lib/zope2.9/lib/python/OFS/Uninstalled.py", line 40, in __getstate__ raise SystemError, (
# End of upgrade path, migration has finished
# The upgrade path did NOT reach current version
# Migration has failed
# Dry run selected, transaction aborted
Change History
comment:2 Changed 5 years ago by hannosch
- Status changed from new to closed
- Resolution set to wontfix
- Milestone changed from 2.5.x to 2.5.2
Sorry, but we do not support the migration from the highly experimental ATContentTypes releases prior to the ones included with Plone itself.
comment:3 Changed 5 years ago by lecler
I had the same problem. It was due to objects (created with atct 0.2) with local schemas.
Fix :
- suppress local schemas in plone 2.0.5 instance and migrate after.
The script to suppres local schemas :
from Products.CMFCore.utils import getToolByName cat = getToolByName(portal, 'portal_catalog') brains = cat(portal_type='your_portal_type') for b in brains:
obj = b.getObject() if obj is None:
continue
if 'schema' in obj.dict:
del obj.schema
