Upgrading plone 4.0 to latest

Hi,
I have a Intranet site which i want to upgrade from plone 4.0 to 5.1.
The 4.0 is on a centos 5.7 box and i want to move to a centos 7 box .
What is the best way to go ?
thanks
Harry

I'd recommend to upgrade to 4.3 first and see what happens ... if that's working you can give the 5.1 upgrade steps a chance ...

Hi,
in documentation 4.0 to 4.1 the say to change setup.py

which setup.py is that ?

install_requires=[
'setuptools',
'Plone',
],

Thks

Read carefully ... this is only in case you have Plone somewhere in your setup.py you should change it to Products.CMFPlone ... but as you don't know which setup.py it's likely you do not have these dependencies declared in your theme/addon package.

I'd go with updating your buildout to the https://dist.plone.org/release/4.3-latest/versions.cfg versions and see which addon has to be pinned separately in your local [versions] section ... maybe also the configs from https://github.com/collective/buildout.plonetest help you to get some predefined settings there.

1 Like

Hi ,
i get following error when i try to go from 4.0 to 4.1
Getting distribution for 'distribute==0.6.16'.
Error: Couldn't find a distribution for 'distribute==0.6.16'.
*************** PICKED VERSIONS ****************
[versions]
any ideas
thanks
Harry

hi
i inserted
index = https://pypi.python.org/simple
now i get ssl error because my centos 5.7 is to old

Can i install plone 4.0 on a centos 7
then copy my site to the new centos 7 server and upgrade from there ?
thanks for your reply
rgds
harry

Harry,

Judging by your error messages don't bother trying to do a migration on an existing box or one like it. That's an express train to disappointment station or crazy-town.

Before migrating I'd:

  • make a list of all add-ons you've got running in the old site
  • uninstall all unnecessary add-ons on migration instance (we're not working on production are we?).

Are you on or have access to VM platform? Best practice would be to target the latest stable release of the distro you work with. Start with the minimum server install and then add:

  • EPEL and Remi's repos installed and configured (seemed to indicate RHEL based distro).
  • Install Plone's pre-requisites
  • download latest Plone 5.x and get a vanilla Plone 5 running
  • At this point, I'd snapshot/freeze this machine as a starting point
  • get a notebook or pile of napkins to write your migration notes on

Once you've got a working Plone 5 instance, sync your data.fs and blob files to your migration machine. Check your file permissions, restart Zope and try to run the migration.

Milage may vary, but bare minimum add-on migration usually works best, then you can see what new add-ons meet your needs or choose to move to make you're own (Dexterity all the way).

1 Like

@riker11451's suggestions are comprehensive, though you'd be going directly to Plone 5.1.5, which may not work as the upgrade between 4.0 and 5.1.5 isn't a direct path, as mentioned by @petschki

You could certainly install the latest 4.x (4.3.8) onto a Centos 7 box then copy your Data.fs and blobstorage.

Hi,
finally i am going to install plone 5.1 on centos7:
then migrate data.fs and blob files
Below my buildout.cfg file of plone 4.0 on centos 5.7. With which eggs will i have trouble in plone 5.1 ?
thanks for the info
rgds Harry

eggs =
Plone
PIL==1.1.6
collective.contacts
zettwerk.ui==0.40
quintagroup.theme.schools
Products.ContentWellPortlets
Plomino
plomino.tinymce
plone.app.ldap
collective.easyslider
Products.PloneSlimbox
collective.galleriffic
atreal.richfile.preview

zcml =
collective.contacts
plomino.tinymce
plone.app.ldap
collective.easyslider
collective.gallery
collective.galleriffic
atreal.richfile.preview

[versions]
Cheetah = 2.2.1
Paste = 1.7.5.1
PasteScript = 1.7.3
ZopeSkel = 2.19
collective.recipe.backup = 1.7
plone.recipe.command = 1.1
plone.recipe.osxcontroller = 0.4
plone.recipe.unifiedinstaller = 4.0rc1
collective.z3cform.datetimewidget = 1.0
Pillow = 1.7.2
Products.DocFinderTab = 1.0.4
ZopeSkel = 2.19
collective.recipe.backup = 1.7
collective.recipe.omelette = 0.10
plone.recipe.command = 1.1
plone.recipe.osxcontroller = 0.4
plone.recipe.unifiedinstaller = 4.0rc1
collective.z3cform.datetimewidget = 1.0
plone.app.registry = 1.0b2
plone.app.textfield = 1.0b6
plone.app.z3cform = 0.5.0
plone.autoform = 1.0b4
plone.directives.form = 1.0b7
plone.formwidget.autocomplete = 1.0
plone.formwidget.contenttree = 1.0b1
plone.formwidget.namedfile = 1.0b5
plone.namedfile = 1.0b5
plone.registry = 1.0b2
plone.scale = 1.1
plone.supermodel = 1.0b5
plone.z3cform = 0.7.0
uuid = 1.30
z3c.batching = 1.1.0
z3c.blobfile = 0.1.4
z3c.form = 2.3.3
z3c.formwidget.query = 0.5
zc.sourcefactory = 0.6.0
zope.filerepresentation = 3.6.0
zope.schema = 3.6.4

I am pretty sure you will have problems with the theme and easy slider, and also Slimbox:

quintagroup.theme.schools
collective.easyslider
Products.PloneSlimbox

Gallerific and zettwerk.ui should also be skipped.

About the others I dont know

For PIL you should NOT pin the version (in fact, you should not use any of these pins

i only can install Products.PloneSlimbox
when i do upgrade an mysite:8080
i get following error
How do i migrate a site ?
i cannot upgrade plone 4.0 on centos 5.7
i cannot install a new plone 5.1 on Centos 7 and copy the site?
Any ideas i am getting desperate
Thks harry

Module ZPublisher.Publish, line 249, in publish_module_standard
Module ZPublisher.Publish, line 197, in publish
Module zope.event, line 31, in notify
Module zope.component.event, line 27, in dispatch
Module zope.component._api, line 139, in subscribers
Module zope.interface.registry, line 442, in subscribers
Module ZODB.Connection, line 800, in setstate
Module ZODB.serialize, line 623, in setGhostState
Module zope.component.persistentregistry, line 39, in __setstate__
Module zope.interface.adapter, line 97, in _createLookup
Module zope.interface.adapter, line 458, in __init__
Module zope.interface.adapter, line 495, in init_extendors
Module zope.interface.adapter, line 499, in add_extendor

First things first:

  1. Install Plone 5.1 (without any old stuff) on the new machine
  2. Add a Plone site, see if everything works.
  3. add some add-ons, see if it works
  4. Repeat with other add-ons.
  5. Stop Plone

When you have found which add-ons that do not work in Plone 5, this is what I would do (someone correct me if I am wrong)

  1. Take backup of old site (at least take backup of 'var' folder (zinstance/var)
  2. Uninstall ALL add-ons that did not work. Also the theme, and delete all customizations you have done TTW (remove all files in /portal_skins/custom if you have 'done anything there')
  3. Pack database
  4. Copy the whole 'var' folder to the new server and replace the 'var' folder in your new site with this
  5. Start Plone in debug ( fg )
  6. If it starts you will be asked to upgrade
1 Like

Hi Espen,
i did al the things you pointed out did a uninstall of all things in plone 4.0 i could not instale in plone 5
then i compied the var folder i got the button upgrade for my plone site
i then push upgrade and got this. Any hints what i can do next
Traceback (innermost last):

Module ZPublisher.Publish, line 249, in publish_module_standard
Module ZPublisher.Publish, line 197, in publish
Module zope.event, line 31, in notify
Module zope.component.event, line 27, in dispatch
Module zope.component._api, line 139, in subscribers
Module zope.interface.registry, line 442, in subscribers
Module ZODB.Connection, line 800, in setstate
Module ZODB.serialize, line 623, in setGhostState
Module zope.component.persistentregistry, line 39, in __setstate__
Module zope.interface.adapter, line 97, in _createLookup
Module zope.interface.adapter, line 458, in __init__
Module zope.interface.adapter, line 495, in init_extendors
Module zope.interface.adapter, line 499, in add_extendor

AttributeError: type object 'ICacheManager' has no attribute 'iro'

AttributeError: type object 'IFieldValueSetter' has no attribute '__iro__'
2019-03-25 17:17:37 ERROR ZODB.Connection Couldn't load state for zope.component.persistentregistry.PersistentAdapterRegistry 0x035d
Traceback (most recent call last):
  File "/opt/plone/buildout-cache/eggs/ZODB-5.3.0-py2.7.egg/ZODB/Connection.py", line 800, in setstate
    self._reader.setGhostState(obj, p)
  File "/opt/plone/buildout-cache/eggs/ZODB-5.3.0-py2.7.egg/ZODB/serialize.py", line 623, in setGhostState
    obj.__setstate__(state)
  File "/opt/plone/buildout-cache/eggs/zope.component-4.4.1-py2.7.egg/zope/component/persistentregistry.py", line 39, in __setstate__
    self._createLookup()
  File "/opt/plone/buildout-cache/eggs/zope.interface-4.4.3-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 97, in _createLookup
    self._v_lookup = self.LookupClass(self)
  File "/opt/plone/buildout-cache/eggs/zope.interface-4.4.3-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 458, in __init__
    self.init_extendors()
  File "/opt/plone/buildout-cache/eggs/zope.interface-4.4.3-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 495, in init_extendors
    self.add_extendor(p)
  File "/opt/plone/buildout-cache/eggs/zope.interface-4.4.3-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 499, in add_extendor
    for i in provided.__iro__:
AttributeError: type object 'IFieldValueSetter' has no attribute '__iro__'
2019-03-25 17:17:37 ERROR ZODB.Connection Couldn't load state for zope.component.persistentregistry.PersistentAdapterRegistry 0x035d
Traceback (most recent call last):
  File "/opt/plone/buildout-cache/eggs/ZODB-5.3.0-py2.7.egg/ZODB/Connection.py", line 800, in setstate
    self._reader.setGhostState(obj, p)
  File "/opt/plone/buildout-cache/eggs/ZODB-5.3.0-py2.7.egg/ZODB/serialize.py", line 623, in setGhostState
    obj.__setstate__(state)
  File "/opt/plone/buildout-cache/eggs/zope.component-4.4.1-py2.7.egg/zope/component/persistentregistry.py", line 39, in __setstate__
    self._createLookup()
  File "/opt/plone/buildout-cache/eggs/zope.interface-4.4.3-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 97, in _createLookup
    self._v_lookup = self.LookupClass(self)
  File "/opt/plone/buildout-cache/eggs/zope.interface-4.4.3-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 458, in __init__
    self.init_extendors()
  File "/opt/plone/buildout-cache/eggs/zope.interface-4.4.3-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 495, in init_extendors
    self.add_extendor(p)
  File "/opt/plone/buildout-cache/eggs/zope.interface-4.4.3-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 499, in add_extendor
    for i in provided.__iro__:
AttributeError: type object 'IFieldValueSetter' has no attribute '__iro__'
2019-03-25 17:17:37 ERROR ZODB.Connection Couldn't load state for zope.component.persistentregistry.PersistentAdapterRegistry 0x035d
Traceback (most recent call last):
  File "/opt/plone/buildout-cache/eggs/ZODB-5.3.0-py2.7.egg/ZODB/Connection.py", line 800, in setstate
    self._reader.setGhostState(obj, p)
  File "/opt/plone/buildout-cache/eggs/ZODB-5.3.0-py2.7.egg/ZODB/serialize.py", line 623, in setGhostState
    obj.__setstate__(state)
  File "/opt/plone/buildout-cache/eggs/zope.component-4.4.1-py2.7.egg/zope/component/persistentregistry.py", line 39, in __setstate__
    self._createLookup()
  File "/opt/plone/buildout-cache/eggs/zope.interface-4.4.3-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 97, in _createLookup
    self._v_lookup = self.LookupClass(self)
  File "/opt/plone/buildout-cache/eggs/zope.interface-4.4.3-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 458, in __init__
    self.init_extendors()
  File "/opt/plone/buildout-cache/eggs/zope.interface-4.4.3-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 495, in init_extendors
    self.add_extendor(p)
  File "/opt/plone/buildout-cache/eggs/zope.interface-4.4.3-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 499, in add_extendor
    for i in provided.__iro__:
AttributeError: type object 'IFieldValueSetter' has no attribute '__iro__'
2019-03-25 17:17:37 ERROR ZODB.Connection Couldn't load state for zope.component.persistentregistry.PersistentAdapterRegistry 0x035d
Traceback (most recent call last):
  File "/opt/plone/buildout-cache/eggs/ZODB-5.3.0-py2.7.egg/ZODB/Connection.py", line 800, in setstate
    self._reader.setGhostState(obj, p)
  File "/opt/plone/buildout-cache/eggs/ZODB-5.3.0-py2.7.egg/ZODB/serialize.py", line 623, in setGhostState
    obj.__setstate__(state)
  File "/opt/plone/buildout-cache/eggs/zope.component-4.4.1-py2.7.egg/zope/component/persistentregistry.py", line 39, in __setstate__
    self._createLookup()
  File "/opt/plone/buildout-cache/eggs/zope.interface-4.4.3-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 97, in _createLookup
    self._v_lookup = self.LookupClass(self)
  File "/opt/plone/buildout-cache/eggs/zope.interface-4.4.3-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 458, in __init__
    self.init_extendors()
  File "/opt/plone/buildout-cache/eggs/zope.interface-4.4.3-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 495, in init_extendors
    self.add_extendor(p)
  File "/opt/plone/buildout-cache/eggs/zope.interface-4.4.3-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 499, in add_extendor
    for i in provided.__iro__:
AttributeError: type object 'IFieldValueSetter' has no attribute '__iro__'
2019-03-25 17:17:37 ERROR ZServerPublisher exception caught
Traceback (most recent call last):
  File "/opt/plone/buildout-cache/eggs/Zope2-2.13.27-py2.7.egg/ZServer/PubCore/ZServerPublisher.py", line 31, in __init__
    response=b)
  File "/opt/plone/buildout-cache/eggs/Zope2-2.13.27-py2.7.egg/ZPublisher/Publish.py", line 455, in publish_module
    environ, debug, request, response)
  File "/opt/plone/buildout-cache/eggs/Zope2-2.13.27-py2.7.egg/ZPublisher/Publish.py", line 276, in publish_module_standard
    if request is not None: request.close()
  File "/opt/plone/buildout-cache/eggs/Zope2-2.13.27-py2.7.egg/ZPublisher/BaseRequest.py", line 220, in close
    notify(EndRequestEvent(None, self))
  File "/opt/plone/buildout-cache/eggs/zope.event-3.5.2-py2.7.egg/zope/event/__init__.py", line 31, in notify
    subscriber(event)
  File "/opt/plone/buildout-cache/eggs/zope.component-4.4.1-py2.7.egg/zope/component/event.py", line 27, in dispatch
    component_subscribers(event, None)
  File "/opt/plone/buildout-cache/eggs/zope.component-4.4.1-py2.7.egg/zope/component/_api.py", line 139, in subscribers
    return sitemanager.subscribers(objects, interface)
  File "/opt/plone/buildout-cache/eggs/zope.interface-4.4.3-py2.7-linux-x86_64.egg/zope/interface/registry.py", line 442, in subscribers
    return self.adapters.subscribers(objects, provided)
  File "/opt/plone/buildout-cache/eggs/ZODB-5.3.0-py2.7.egg/ZODB/Connection.py", line 800, in setstate
    self._reader.setGhostState(obj, p)
  File "/opt/plone/buildout-cache/eggs/ZODB-5.3.0-py2.7.egg/ZODB/serialize.py", line 623, in setGhostState
    obj.__setstate__(state)
  File "/opt/plone/buildout-cache/eggs/zope.component-4.4.1-py2.7.egg/zope/component/persistentregistry.py", line 39, in __setstate__
    self._createLookup()
  File "/opt/plone/buildout-cache/eggs/zope.interface-4.4.3-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 97, in _createLookup
    self._v_lookup = self.LookupClass(self)
  File "/opt/plone/buildout-cache/eggs/zope.interface-4.4.3-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 458, in __init__
    self.init_extendors()
  File "/opt/plone/buildout-cache/eggs/zope.interface-4.4.3-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 495, in init_extendors
    self.add_extendor(p)
  File "/opt/plone/buildout-cache/eggs/zope.interface-4.4.3-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 499, in add_extendor
    for i in provided.__iro__:
AttributeError: type object 'IFieldValueSetter' has no attribute '__iro__'

Hi
i used https://pypi.org/project/wildcard.fixpersistentutilities/ to get rid of the previous error
and FPU_GENERATE_MISSING_CLASSES true
Now next problem
TypeError('Cache values must be persistent objects.',) (Also, the following error occurred while attempting to render the standard error message, please see the event log for full details: Interface Products.CMFPlone.interfaces.controlpanel.ISecuritySchema defines a field enable_user_folders, for which there is no record.)
Thks verry much for your help i am getting desperate
rgds
harry

i am still trying to upgrade
now i got gollowing erro can anyone please help me
thks Harry
Conings Harry (VNZ)

10:11 (0 minuten geleden)

aan ik

Bericht vertalen
Uitschakelen voor: Engels

ComponentLookupError: (, '')

  • Expression: "provider:plone.httpheaders"

  • Filename: ... egg/Products/CMFPlone/browser/templates/main_template.pt

  • Location: (line 23: col 40)

  • Source: ... :replace="structure provider:plone.httpheaders" />

                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
    
  • Arguments: repeat: {...} (0)

TypeError('Cache values must be persistent objects.',) (Also, the following error occurred while attempting to render the standard error message, please see the event log for full details: (, ''))