#96 — Migrating Plone 2.5 to 3.0 fails due to CacheSetup
| State | Resolved |
|---|---|
| Version: | 1.1 |
| Area | Functionality |
| Issue type | Bug |
| Severity | Medium |
| Submitted by | Maurits van Rees |
| Submitted on | Aug 31, 2007 |
| Responsible | Ricardo Newbery |
| Target release: | 1.1.1 |
Last modified on
Jan 08, 2009
by
Matthew Wilkes
I have a web site with Plone 2.5 and accompanying CacheSetup 1.0. I want to upgrade to Plone 3.0. So I put the Plone 3.0 files in the right spot and add CacheSetup and friends from https://svn.plone.org/[…]/plone-3.0
First question: is that the right bundle to take for use with Plone 3.0? If not, then my remarks below need to be taken with a large grain of salt. :)
Starting the Plone migration gives this error:
Traceback (innermost last):
Module ZPublisher.Publish, line 119, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 42, in call_object
Module Shared.DC.Scripts.Bindings, line 313, in __call__
Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
Module Products.PageTemplates.PageTemplateFile, line 129, in _exec
Module Products.CacheSetup.patch_cmf, line 74, in PT_pt_render
Module Products.Archetypes.ClassGen, line 56, in generatedAccessor
Module Products.Archetypes.Schema, line 233, in __getitem__
KeyError: 'enabled'
So the field 'enabled' was apparently not in the 1.0 schema and Plone/Zope does not know that field yet. Going to the quick installer in hopes of fixing it fails as it gives the same error. I went ahead and fixed it by adding this to CacheSetup/content/cache_tool.py:
def getEnabled(self):
self.getField('enabled') or False
With this change I can run the migration from Plone 2.5 to 3.0 and view the quick installer.
I think that change cannot cause any problems, but it is best to report it here anyway.
And: basically the same errors are thrown for activePolicyId and proxyPurgeConfig, which means that reinstalling of CacheSetup fails. I suspect these could be fixed by similar changes.
Have other people tried this migration and come up with better results?
I will be on vacation shortly so any further changes will have to come from someone else. Besides, I hardly know CacheFu and friends so I am surprised I came this far. :)
First question: is that the right bundle to take for use with Plone 3.0? If not, then my remarks below need to be taken with a large grain of salt. :)
Starting the Plone migration gives this error:
Traceback (innermost last):
Module ZPublisher.Publish, line 119, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 42, in call_object
Module Shared.DC.Scripts.Bindings, line 313, in __call__
Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
Module Products.PageTemplates.PageTemplateFile, line 129, in _exec
Module Products.CacheSetup.patch_cmf, line 74, in PT_pt_render
Module Products.Archetypes.ClassGen, line 56, in generatedAccessor
Module Products.Archetypes.Schema, line 233, in __getitem__
KeyError: 'enabled'
So the field 'enabled' was apparently not in the 1.0 schema and Plone/Zope does not know that field yet. Going to the quick installer in hopes of fixing it fails as it gives the same error. I went ahead and fixed it by adding this to CacheSetup/content/cache_tool.py:
def getEnabled(self):
self.getField('enabled') or False
With this change I can run the migration from Plone 2.5 to 3.0 and view the quick installer.
I think that change cannot cause any problems, but it is best to report it here anyway.
And: basically the same errors are thrown for activePolicyId and proxyPurgeConfig, which means that reinstalling of CacheSetup fails. I suspect these could be fixed by similar changes.
Have other people tried this migration and come up with better results?
I will be on vacation shortly so any further changes will have to come from someone else. Besides, I hardly know CacheFu and friends so I am surprised I came this far. :)
- Steps to reproduce:
- The following should do it, though I have not tried it with a clean database.
- Make a Plone 2.5 site with CacheSetup 1.0 installed.
- Switch to Plone 3.0 and CacheSetup from the plone-3.0 bundle.
- Try the portal_migration to 3.0: this will give an error about 'enabled'
- Visit the portal_quickinstaller: same AttributeError.
Added byMaurits van ReesonAug 31, 2007 10:04 PM
See http://dev.plone.org/collective/changeset/48446Target release:
1.1.1
→
None
Responsible manager:
newbery
→
(UNASSIGNED)
Added byMaurits van ReesonSep 01, 2007 10:10 AM
I added a remark in INSTALL.txt in r48484:
In the archetype_tool go to the Update Schema tab and update the
schema of CacheSetup.CacheTool. Uncheck all others. They can be
done later.
My small change of yesterday (r48446) is still needed as else visiting the archetype_tool gives that "AttributeError: enabled".
I think this bug report can be closed then. But please check if my two additions are sane, as I do not know too much about CacheFu and may easily have made a crucial thinking error.
Added byMaurits van ReesonSep 01, 2007 10:32 AM
Duh. I made a rooky mistake in my first change because I was too eager to get rid of that AttributeError and did not verify if it still worked as expected when the attribute was actually there. Fixed in r48485.
Added byRicardo NewberyonFeb 06, 2008 03:57 AM
maurits' changes in svn appear to solve this issue. Closing ticket.
Issue state:
unconfirmed
→
resolved
Target release:
None
→
1.1.1
Responsible manager:
(UNASSIGNED)
→
newbery
Add response
If you can, please log in before submitting a reaction.