From 922954a01382ec9a1bb1790e98c3cb199e5dd885 Mon Sep 17 00:00:00 2001 From: mauritsvanrees Date: Wed, 25 Oct 2023 17:15:28 +0200 Subject: [PATCH] [fc] Repository: Products.CMFPlone MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Branch: refs/heads/5.2.x Date: 2023-10-19T16:04:55+02:00 Author: Johannes Raggam (thet) Commit: https://github.com/plone/Products.CMFPlone/commit/c86a5f594fc75f4c91060d8894147e58c966637a Fix problem when adding a Plone site with a custom INonInstallable utility without a getNonInstallableProfiles method. Fixes: #3862. Files changed: A news/3862.bugfix M Products/CMFPlone/browser/admin.py Repository: Products.CMFPlone Branch: refs/heads/5.2.x Date: 2023-10-25T17:15:28+02:00 Author: Maurits van Rees (mauritsvanrees) Commit: https://github.com/plone/Products.CMFPlone/commit/daa4f0215393cfc71fae28be50feb371cccab8f4 Merge pull request #3863 from plone/fix-addsite-no-getnoninstallableproducts Fix problem when adding a Plone site with a custom INonInstallable ut… Files changed: A news/3862.bugfix M Products/CMFPlone/browser/admin.py --- last_commit.txt | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/last_commit.txt b/last_commit.txt index ee693fe1fb..d39f8bf8a9 100644 --- a/last_commit.txt +++ b/last_commit.txt @@ -1,16 +1,36 @@ -Repository: plone.app.linkintegrity +Repository: Products.CMFPlone -Branch: refs/heads/3.x -Date: 2023-09-29T16:48:20+02:00 -Author: Timo Stollenwerk (tisto) -Commit: https://github.com/plone/plone.app.linkintegrity/commit/fdb50f90a110b963aea99380d7e999d57ff23fe3 +Branch: refs/heads/5.2.x +Date: 2023-10-19T16:04:55+02:00 +Author: Johannes Raggam (thet) +Commit: https://github.com/plone/Products.CMFPlone/commit/c86a5f594fc75f4c91060d8894147e58c966637a -Re-add utils.py, fix test_info.py +Fix problem when adding a Plone site with a custom INonInstallable utility without a getNonInstallableProfiles method. + +Fixes: #3862. + +Files changed: +A news/3862.bugfix +M Products/CMFPlone/browser/admin.py + +b'diff --git a/Products/CMFPlone/browser/admin.py b/Products/CMFPlone/browser/admin.py\nindex 7b1c1b502c..b1034309b1 100644\n--- a/Products/CMFPlone/browser/admin.py\n+++ b/Products/CMFPlone/browser/admin.py\n@@ -150,7 +150,11 @@ def profiles(self):\n ]\n utils = getAllUtilitiesRegisteredFor(INonInstallable)\n for util in utils:\n- not_installable.extend(util.getNonInstallableProfiles())\n+ not_installable.extend(\n+ util.getNonInstallableProfiles()\n+ if hasattr(util, "getNonInstallableProfiles")\n+ else []\n+ )\n \n for info in profile_registry.listProfileInfo():\n if info.get(\'type\') == EXTENSION and \\\ndiff --git a/news/3862.bugfix b/news/3862.bugfix\nnew file mode 100644\nindex 0000000000..a9e0e6be6d\n--- /dev/null\n+++ b/news/3862.bugfix\n@@ -0,0 +1,3 @@\n+Fix problem when adding a Plone site with a custom INonInstallable utility without a getNonInstallableProfiles method.\n+\n+Fixes: #3862.\n' + +Repository: Products.CMFPlone + + +Branch: refs/heads/5.2.x +Date: 2023-10-25T17:15:28+02:00 +Author: Maurits van Rees (mauritsvanrees) +Commit: https://github.com/plone/Products.CMFPlone/commit/daa4f0215393cfc71fae28be50feb371cccab8f4 + +Merge pull request #3863 from plone/fix-addsite-no-getnoninstallableproducts + +Fix problem when adding a Plone site with a custom INonInstallable ut… Files changed: -A plone/app/linkintegrity/tests/utils.py -M plone/app/linkintegrity/tests/test_info.py +A news/3862.bugfix +M Products/CMFPlone/browser/admin.py -b'diff --git a/plone/app/linkintegrity/tests/test_info.py b/plone/app/linkintegrity/tests/test_info.py\nindex 2b51729..c4c4457 100644\n--- a/plone/app/linkintegrity/tests/test_info.py\n+++ b/plone/app/linkintegrity/tests/test_info.py\n@@ -6,7 +6,7 @@\n \n \n class DeleteConfirmationInfoTestCase(unittest.TestCase):\n- layer = testing.PLONE_APP_LINKINTEGRITY_INTEGRATION_TESTING\n+ layer = testing.PLONE_APP_LINKINTEGRITY_DX_FUNCTIONAL_TESTING\n \n def setUp(self):\n self.portal = self.layer["portal"]\ndiff --git a/plone/app/linkintegrity/tests/utils.py b/plone/app/linkintegrity/tests/utils.py\nnew file mode 100644\nindex 0000000..895e85f\n--- /dev/null\n+++ b/plone/app/linkintegrity/tests/utils.py\n@@ -0,0 +1,7 @@\n+from plone.app.textfield import RichTextValue\n+from zope.lifecycleevent import modified\n+\n+\n+def set_text(obj, text):\n+ obj.text = RichTextValue(text)\n+ modified(obj)\n' +b'diff --git a/Products/CMFPlone/browser/admin.py b/Products/CMFPlone/browser/admin.py\nindex 7b1c1b502c..b1034309b1 100644\n--- a/Products/CMFPlone/browser/admin.py\n+++ b/Products/CMFPlone/browser/admin.py\n@@ -150,7 +150,11 @@ def profiles(self):\n ]\n utils = getAllUtilitiesRegisteredFor(INonInstallable)\n for util in utils:\n- not_installable.extend(util.getNonInstallableProfiles())\n+ not_installable.extend(\n+ util.getNonInstallableProfiles()\n+ if hasattr(util, "getNonInstallableProfiles")\n+ else []\n+ )\n \n for info in profile_registry.listProfileInfo():\n if info.get(\'type\') == EXTENSION and \\\ndiff --git a/news/3862.bugfix b/news/3862.bugfix\nnew file mode 100644\nindex 0000000000..a9e0e6be6d\n--- /dev/null\n+++ b/news/3862.bugfix\n@@ -0,0 +1,3 @@\n+Fix problem when adding a Plone site with a custom INonInstallable utility without a getNonInstallableProfiles method.\n+\n+Fixes: #3862.\n'