2025-03-20 17:28:22,902 ERROR [Zope.SiteErrorLog:35][waitress-0] AttributeError: http://localhost:8120/upgrades-api/list_plone_sites
Traceback (innermost last):
Module ZPublisher.WSGIPublisher, line 181, in transaction_pubevents
Module ZPublisher.WSGIPublisher, line 390, in publish_module
Module ZPublisher.WSGIPublisher, line 284, in publish
Module ZPublisher.mapply, line 98, in mapply
Module ZPublisher.WSGIPublisher, line 68, in call_object
Module ftw.upgrade.jsonapi.utils, line 128, in json_wrapper
Module ftw.upgrade.jsonapi.utils, line 109, in action_wrapper
Module ftw.upgrade.jsonapi.zopeapp, line 15, in list_plone_sites
Module ftw.upgrade.jsonapi.zopeapp, line 27, in _get_plone_sites
AttributeError: 'SimpleViewClass from /home/ale/.buildout/eggs/cp31' object has no attribute 'sites'
If I run the upgrade script on Plone 6.1, I see in the instance logs:
The reason is that this code:
ftw.upgrade/ftw/upgrade/jsonapi/zopeapp.py
Lines 26 to 27 in 76d047e
Fails on 6.1 because
plone.distributionoverrides theplone-overviewwith a view whose class does not have asitesmethod.https://github.com/plone/plone.distribution/blob/51a13c21032325943f870c7feca2fcd5a8bec6bd/src/plone/distribution/browser/overrides.zcml#L34-L40
The package
plone.distributionhas anyway a helper to return the sites:https://github.com/plone/plone.distribution/blob/51a13c21032325943f870c7feca2fcd5a8bec6bd/src/plone/distribution/api/site.py#L113-L136