Migration Plone 5.1.1 to 5.2.4

Hello everyone,

I just migrated from 5.1.1 to 5.2.4 with bin / buildout.
During compilation, no errors:

Unused options for buildout: 'unzip'.
Updating instance.
Updating zopepy.
Updating zopeskel.
Updating unifiedinstaller.
Updating repozo.
Updating backup.
Updating chown.
chown: Running echo Dummy references to force this to execute after referenced parts
echo /data/Plone/zinstance/var/backups sudo -u plone
chmod 600 .installed.cfg
find /data/Plone/zinstance/var -type d -exec chmod 700 {} \;
chmod 744 /data/Plone/zinstance/bin/*
Dummy references to force this to execute after referenced parts
/data/Plone/zinstance/var/backups sudo -u plone

So then I run the instance with bin/instance fg

2021-06-11 11:53:52,591 WARNING [Application:394][MainThread] Duplicate Product name: After loading Product 'Five' from '/data/Plone/buildout-cache/eggs/Zope-4.5.5-py2.7.egg/Products', I skipped the one in '/usr/local/lib/python2.7/site-packages/Products'.
2021-06-11 11:53:52,618 WARNING [Application:394][MainThread] Duplicate Product name: After loading Product 'OFSP' from '/data/Plone/buildout-cache/eggs/Zope-4.5.5-py2.7.egg/Products', I skipped the one in '/usr/local/lib/python2.7/site-packages/Products'.
2021-06-11 11:53:52,619 WARNING [Application:394][MainThread] Duplicate Product name: After loading Product 'PageTemplates' from '/data/Plone/buildout-cache/eggs/Zope-4.5.5-py2.7.egg/Products', I skipped the one in '/usr/local/lib/python2.7/site-packages/Products'.
2021-06-11 11:53:52,757 WARNING [Application:394][MainThread] Duplicate Product name: After loading Product 'SiteAccess' from '/data/Plone/buildout-cache/eggs/Zope-4.5.5-py2.7.egg/Products', I skipped the one in '/usr/local/lib/python2.7/site-packages/Products'.
2021-06-11 11:53:52,862 WARNING [TemporaryStorage:93][MainThread] DEPRECATED: Usage of the package tempstorage is deprecated, as it is known to randomly lose data.
Especially on Zope 4. For details see https://github.com/zopefoundation/tempstorage/issues/8
and https://github.com/zopefoundation/tempstorage

/data/Plone/buildout-cache/eggs/tempstorage-5.1-py2.7.egg/tempstorage/TemporaryStorage.py:94: DeprecationWarning: DEPRECATED: Usage of the package tempstorage is deprecated, as it is known to randomly lose data.
Especially on Zope 4. For details see https://github.com/zopefoundation/tempstorage/issues/8
and https://github.com/zopefoundation/tempstorage

  warnings.warn(deprecation_warning, DeprecationWarning)
2021-06-11 11:53:53,824 INFO    [chameleon.config:38][MainThread] directory cache: /data/Plone/zinstance/var/cache.
2021-06-11 11:53:57,013 INFO    [Zope:45][MainThread] Ready to handle requests
Starting server in PID 30228.
Serving on http://0.0.0.0:8080

And when I access the website I have:

Internal Server Error
The server encountered an unexpected internal server error
(generated by waitress)

And in the log :

2021-06-11 11:56:02,358 ERROR   [ZODB.Connection:809][waitress-0] Couldn't load state for zope.component.persistentregistry.PersistentAdapterRegistry 0x02ea
[...]
AttributeError: type object 'IATCTTool' has no attribute '__iro__'
2021-06-11 11:56:02,364 ERROR   [ZODB.Connection:809][waitress-0] Couldn't load state for zope.component.persistentregistry.PersistentAdapterRegistry 0x02ea
[...]
AttributeError: type object 'IATCTTool' has no attribute '__iro__'
2021-06-11 11:56:02,364 ERROR   [root:28][waitress-0] PageTemplateFile: Error in template /data/Plone/buildout-cache/eggs/Products.CMFPlone-5.2.4-py2.7.egg/Products/CMFPlone/browser/template
s/error_message.pt: Compilation failed
exceptions.AttributeError: type object 'IATCTTool' has no attribute '__iro__'
2021-06-11 11:56:02,366 ERROR   [ZODB.Connection:809][waitress-0] Couldn't load state for zope.component.persistentregistry.PersistentAdapterRegistry 0x02ea
[...]
AttributeError: type object 'IATCTTool' has no attribute '__iro__'
2021-06-11 11:56:02,367 ERROR   [root:28][waitress-0] PageTemplateFile: Error in template /data/Plone/buildout-cache/eggs/Products.CMFPlone-5.2.4-py2.7.egg/Products/CMFPlone/browser/template
s/basic_error_message.pt: Compilation failed
exceptions.AttributeError: type object 'IATCTTool' has no attribute '__iro__'
2021-06-11 11:56:02,368 ERROR   [ZODB.Connection:809][waitress-0] Couldn't load state for zope.component.persistentregistry.PersistentAdapterRegistry 0x02ea
[...]
AttributeError: type object 'IATCTTool' has no attribute '__iro__'
2021-06-11 11:56:02,369 ERROR   [waitress:358][waitress-0] Exception while serving /VirtualHostBase/https/10.203.7.2:443/intranet/VirtualHostRoot/
[...]
AttributeError: type object 'IATCTTool' has no attribute '__iro__'

Do you have an idea please?

For information, the server is running with Centos 7.5 and python 2.7.14.

The buildout.cfg :

[buildout]
index = https://pypi.org/simple/
extends =
    base.cfg
    http://dist.plone.org/release/5.2.4/versions.cfg
find-links +=
    http://dist.plone.org/release/5.2.4
http-address = 8080
effective-user = plone
eggs =
    Plone
    Pillow
    lxml
zcml =
develop =
debug-mode = off
deprecation-warnings = off
verbose-security = off
backups-dir=${buildout:directory}/var
environment-vars =
    zope_i18n_compile_mo_files true
    PYTHON_EGG_CACHE ${buildout:directory}/var/.python-eggs
user=admin:toto
parts =
    instance
    zopepy
    zopeskel
    unifiedinstaller
    repozo
    backup
    chown
[backup]
scripts = repozo
recipe = zc.recipe.egg
eggs = ZODB3
scripts = repozo
dependent-scripts = true
recipe = collective.recipe.backup
[versions]
[repozo]
recipe = zc.recipe.egg
-ggs = ZODB3
wcripts = repozo
dependent-scripts = true

Thank you in advance for your help.

Best regards,
Zami3l

You are missing the Archetypes packages but still have Archetypes objects in your Database. If you want or need to use Archetypes in Plone 5.2 you need to specify Plone [archetypes] as a egg in your buildout instead of just Plone. Like this:

[buildout]
index = https://pypi.org/simple/
extends =
    base.cfg
    http://dist.plone.org/release/5.2.4/versions.cfg
find-links +=
    http://dist.plone.org/release/5.2.4
http-address = 8080
effective-user = plone
eggs =
    Plone [archetypes]
    Pillow
    lxml
zcml =
develop =
debug-mode = off
deprecation-warnings = off
verbose-security = off
backups-dir=${buildout:directory}/var
environment-vars =
    zope_i18n_compile_mo_files true
    PYTHON_EGG_CACHE ${buildout:directory}/var/.python-eggs
user=admin:toto
parts =

When upgrading always read the Upgrade Guide: Upgrading Plone 5.1 to 5.2 — Plone Documentation v5.2

Errors like this typically indicate that the interface is unknown. Verify that Products.ATContentTypes is installed (it defines IATCTTool).

Hello and thank you for your answers.

To follow up on your answers:

@Dieter Products.ATContentTypes is however well installed. Version 3.0.4

@pbauer I recompiled with the addition of Plone [Archetypes]

I get when starting the instance via /bin/instance fg this:

/data/Plone/buildout-cache/eggs/Products.Archetypes-1.16.4-py2.7.egg/Products/Archetypes/generator/widget.py:4: DeprecationWarning: InitializeClass is deprecated. Please import from AccessControl.class_init.
  from App.class_init import InitializeClass
 /data/Plone/buildout-cache/eggs/Products.Archetypes-1.16.4-py2.7.egg/Products/Archetypes/interfaces/event.py:4: DeprecationWarning: IObjectEvent is deprecated. Import from zope.interface.interfaces
  from zope.component.interfaces import IObjectEvent
/data/Plone/buildout-cache/eggs/Products.Archetypes-1.16.4-py2.7.egg/Products/Archetypes/ReferenceEngine.py:31: DeprecationWarning: LazyMap is deprecated. Please import from ZTUtils.Lazy.
  from Products.ZCatalog.Lazy import LazyMap
/data/Plone/buildout-cache/eggs/Products.Archetypes-1.16.4-py2.7.egg/Products/Archetypes/mimetype_utils.py:9: DeprecationWarning: ComponentLookupError is deprecated. Import from zope.interface.interfaces
  from zope.component.interfaces import ComponentLookupError
/data/Plone/buildout-cache/eggs/Products.Archetypes-1.16.4-py2.7.egg/Products/Archetypes/event.py:6: DeprecationWarning: ObjectEvent is deprecated. Import from zope.interface.interfaces
  from zope.component.interfaces import ObjectEvent
/data/Plone/buildout-cache/eggs/Products.ATContentTypes-3.0.4-py2.7.egg/Products/ATContentTypes/interfaces/factories.py:2: DeprecationWarning: IFileFactory is deprecated. Import IFileFactory from zope.filerepresentation.interfaces instead
  from plone.app.widgets.interfaces import IFileFactory
/data/Plone/buildout-cache/eggs/Products.ATContentTypes-3.0.4-py2.7.egg/Products/ATContentTypes/permission.py:2: DeprecationWarning: IFieldPermissionChecker is deprecated. Import IFieldPermissionChecker from plone.app.z3cform.interfaces instead
  from plone.app.widgets.interfaces import IFieldPermissionChecker
/data/Plone/buildout-cache/eggs/Products.ATContentTypes-3.0.4-py2.7.egg/Products/ATContentTypes/permission.py:8: DeprecationWarning: setDefaultRoles is deprecated. Please use addPermission from AccessControl.Permission.                                                                                                                                                                   from Products.CMFCore.permissions import setDefaultRoles
/data/Plone/buildout-cache/eggs/Products.ATContentTypes-3.0.4-py2.7.egg/Products/ATContentTypes/content/base.py:21: DeprecationWarning: ResourceLockedError is deprecated. Please import from zExceptions.
  from webdav.Lockable import ResourceLockedError
/data/Plone/buildout-cache/eggs/Products.ATContentTypes-3.0.4-py2.7.egg/Products/ATContentTypes/lib/historyaware.py:4: DeprecationWarning: html_quote is deprecated. Please import from DocumentTemplate.html_quote. These shims will go away in DocumentTemplate 4.0.
  from DocumentTemplate.DT_Util import html_quote
/data/Plone/buildout-cache/eggs/Products.ATContentTypes-3.0.4-py2.7.egg/Products/ATContentTypes/content/topic.py:35: DeprecationWarning: LazyCat is deprecated. Please import from ZTUtils.Lazy.
  from Products.ZCatalog.Lazy import LazyCat
/data/Plone/buildout-cache/eggs/Products.ATContentTypes-3.0.4-py2.7.egg/Products/ATContentTypes/tool/factory.py:30: DeprecationWarning: call_object is deprecated. Please import from ZServer.ZPublisher.Publish.
  from ZPublisher.Publish import call_object
/data/Plone/buildout-cache/eggs/Products.ATContentTypes-3.0.4-py2.7.egg/Products/ATContentTypes/tool/factory.py:31: DeprecationWarning: dont_publish_class is deprecated. Please import from ZServer.ZPublisher.Publish.
  from ZPublisher.Publish import dont_publish_class
/data/Plone/buildout-cache/eggs/Products.ATContentTypes-3.0.4-py2.7.egg/Products/ATContentTypes/tool/factory.py:32: DeprecationWarning: missing_name is deprecated. Please import from ZServer.ZPublisher.Publish.
  from ZPublisher.Publish import missing_name
2021-06-14 15:35:27,902 WARNING [Application:394][MainThread] Duplicate Product name: After loading Product 'Five' from '/data/Plone/buildout-cache/eggs/Zope-4.5.5-py2.7.egg/Products', I skipped the one in '/usr/local/lib/python2.7/site-packages/Products'.
2021-06-14 15:35:27,918 WARNING [Application:394][MainThread] Duplicate Product name: After loading Product 'OFSP' from '/data/Plone/buildout-cache/eggs/Zope-4.5.5-py2.7.egg/Products', I skipped the one in '/usr/local/lib/python2.7/site-packages/Products'.
2021-06-14 15:35:27,918 WARNING [Application:394][MainThread] Duplicate Product name: After loading Product 'PageTemplates' from '/data/Plone/buildout-cache/eggs/Zope-4.5.5-py2.7.egg/Products', I skipped the one in '/usr/local/lib/python2.7/site-packages/Products'.
2021-06-14 15:35:28,031 WARNING [Application:394][MainThread] Duplicate Product name: After loading Product 'SiteAccess' from '/data/Plone/buildout-cache/eggs/Zope-4.5.5-py2.7.egg/Products', I skipped the one in '/usr/local/lib/python2.7/site-packages/Products'.
2021-06-14 15:35:28,108 WARNING [TemporaryStorage:93][MainThread] DEPRECATED: Usage of the package tempstorage is deprecated, as it is known to randomly lose data.
Especially on Zope 4. For details see https://github.com/zopefoundation/tempstorage/issues/8
and https://github.com/zopefoundation/tempstorage

/data/Plone/buildout-cache/eggs/tempstorage-5.1-py2.7.egg/tempstorage/TemporaryStorage.py:94: DeprecationWarning: DEPRECATED: Usage of the package tempstorage is deprecated, as it is known to randomly lose data.
Especially on Zope 4. For details see https://github.com/zopefoundation/tempstorage/issues/8
and https://github.com/zopefoundation/tempstorage

  warnings.warn(deprecation_warning, DeprecationWarning)
/data/Plone/buildout-cache/eggs/plone.app.upgrade-2.0.38-py2.7.egg/plone/app/upgrade/__init__.py:157: DeprecationWarning: GopipIndex is deprecated. Please import from plone.folder.nogopip
  from plone.app.folder.nogopip import GopipIndex
/data/Plone/buildout-cache/eggs/plone.app.blob-1.8.1-py2.7.egg/plone/app/blob/content.py:23: DeprecationWarning: MimeTypeException is deprecated. Import from Products.MimetypesRegistry.interfaces instead
  from Products.MimetypesRegistry.common import MimeTypeException
/data/Plone/buildout-cache/eggs/Products.ATContentTypes-3.0.4-py2.7.egg/Products/ATContentTypes/setuphandlers.py:9: DeprecationWarning: ILanguageSchema is deprecated. It has been moved to plone.i18n.interfaces, import from there instead.
  from Products.CMFPlone.interfaces import ILanguageSchema
/data/Plone/buildout-cache/eggs/archetypes.schemaextender-3.0.1-py2.7.egg/archetypes/schemaextender/extender.py:15: DeprecationWarning: zope.site.hooks has moved to zope.component.hooks. Import of zope.site.hooks will become unsupported in Version 5.0
  from zope.site.hooks import getSite
2021-06-14 15:35:28,811 INFO    [chameleon.config:38][MainThread] directory cache: /data/Plone/zinstance/var/cache.
/data/Plone/buildout-cache/eggs/plone.app.contenttypes-2.2.2-py2.7.egg/plone/app/contenttypes/migration/patches.py:13: DeprecationWarning: _marker is deprecated. Please import from Products.
PluginIndexes.unindex.
  from Products.PluginIndexes.common.UnIndex import _marker
2021-06-14 15:35:32,289 INFO    [Zope:45][MainThread] Ready to handle requests
Starting server in PID 11833.
Serving on http://0.0.0.0:8080

And as soon as I access the website I get :

2021-06-14 15:55:09,465 ERROR   [Zope.SiteErrorLog:252][waitress-0] 1623678909.460.322176427849 https://x.x.x.x/front-page
Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 162, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 371, in publish_module
  Module ZPublisher.WSGIPublisher, line 274, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 63, in call_object
  Module Products.CMFDynamicViewFTI.browserdefault, line 83, in __call__
ValueError: No layout found. This may happen b/c nothing was set. Hint: If no FTI was found this happens as well.

If for example I try to access the search page of the website :

2021-06-14 16:38:52,750 ERROR   [Zope.SiteErrorLog:252][waitress-0] 1623681532.750.617230057065 https://x.x.x.x/@@search
Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 162, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 371, in publish_module
  Module ZPublisher.WSGIPublisher, line 274, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 63, in call_object
  Module zope.browserpage.simpleviewclass, line 41, in __call__
  Module Products.Five.browser.pagetemplatefile, line 126, in __call__
  Module Products.Five.browser.pagetemplatefile, line 61, in __call__
  Module zope.pagetemplate.pagetemplate, line 135, in pt_render
  Module Products.PageTemplates.engine, line 378, in __call__
  Module z3c.pt.pagetemplate, line 176, in render
  Module chameleon.zpt.template, line 302, in render
  Module chameleon.template, line 214, in render
  Module chameleon.template, line 192, in render
  Module acd92cdbc7b9475546680a5ecc7c2845, line 3160, in render
  Module 248fa20af6145a9b9794b534ba2e4df9, line 672, in render_master
  Module zope.tales.pythonexpr, line 73, in __call__
   - __traceback_info__: ( plone_layout.mark_view(view))
  Module <string>, line 1, in <module>
  Module plone.app.layout.globals.layout, line 56, in mark_view
  Module plone.memoize.view, line 59, in memogetter
  Module plone.app.layout.globals.context, line 129, in is_view_template
AttributeError: 'NoneType' object has no attribute 'getMethodAliases'

 - Expression: "dummy python: plone_layout.mark_view"
 - Filename:   ... egg/Products/CMFPlone/browser/templates/main_template.pt
 - Location:   (line 14: col 10)
 - Source:     dummy python: plone_layout.mark_view(view);
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Expression: "context/@@main_template/macros/master"
 - Filename:   ... -py2.7.egg/Products/CMFPlone/browser/templates/search.pt
 - Location:   (line 6: col 23)
 - Source:     ... tal:use-macro="context/@@main_template/macros/master"
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Arguments:  repeat: <Products.PageTemplates.engine.RepeatDictWrapper object at 0x7f44a41aae10>
               template: <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x7f449fe2cf90>
               views: <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x7f44a2e168d0>
               request: <WSGIRequest, URL=https://x.x.x.x/@@search>
               args: ()
               here: <PloneSite at /intranet>
               user: <SpecialUser 'Anonymous User'>
               nothing: None
               root: <Application at >
               translate: <function translate at 0x7f44a072eed8>
               container: <PloneSite at /intranet>
               modules: <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter object at 0x7f44a8ac1550>
               traverse_subpath: []
               default: <DEFAULT>
               loop: {}
               context: <PloneSite at /intranet>
               view: <Products.Five.browser.metaconfigure.SimpleViewClass from /data/Plone/buildout-cache/eggs/Products.CMFPlone-5.2.4-py2.7.egg/Products/CMFPlone/browser/templates/search.pt
 object at 0x7f449ff19410>
               target_language: None
               macroname: u'master'
               options: {}
               attrs: {}

What do you recommend ?
Maybe it is better to go through intermediate versions?
However, I have read the recommendations for a migration from 5.1 to 5.2 and it seems to me that I have not forgotten anything else.

Thank you again in advance for your answers.

Hello,

To keep you informed, the migration to 5.2.4 went well.
Adding Plone [Archetypes] fixed the problem.
The other problem came from the reverse-proxy which did not redirect me to the plone upgrade page.
Access from http://server:8080 directly worked.

Thanks again @Dieter and @pbauer for your help :+1: