From 7fe47aafe458b39483752c8eafe76dc78282d2ad Mon Sep 17 00:00:00 2001 From: wesleybl Date: Thu, 3 Oct 2024 12:30:29 -0300 Subject: [PATCH 1/2] Add behavior IVersionable to Portal In order for the working copy of `plone.app.iterate` to work in the Portal, it needs to be versionable and have the IVersionable behavior. See: https://github.com/plone/plone.app.iterate/blob/1908aa1f4e9c95c37143fae88655469b72ea451a/plone/app/iterate/browser/control.py#L50-L52 --- plone/app/versioningbehavior/behaviors.py | 5 +++++ plone/app/versioningbehavior/configure.zcml | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/plone/app/versioningbehavior/behaviors.py b/plone/app/versioningbehavior/behaviors.py index f075016..0b4c72c 100644 --- a/plone/app/versioningbehavior/behaviors.py +++ b/plone/app/versioningbehavior/behaviors.py @@ -47,7 +47,12 @@ class IVersionable(model.Schema): form.no_omit(IAddForm, "changeNote") +class IVersionablePortal(IVersionable): + """Even IVersionable behavior for the Portal.""" + + alsoProvides(IVersionable, IFormFieldProvider) +alsoProvides(IVersionablePortal, IFormFieldProvider) class IVersioningSupport(Interface): diff --git a/plone/app/versioningbehavior/configure.zcml b/plone/app/versioningbehavior/configure.zcml index 8462967..2a56199 100644 --- a/plone/app/versioningbehavior/configure.zcml +++ b/plone/app/versioningbehavior/configure.zcml @@ -31,6 +31,16 @@ marker=".behaviors.IVersioningSupport" /> + + Date: Thu, 3 Oct 2024 12:36:51 -0300 Subject: [PATCH 2/2] Add changes --- news/87.feature | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/87.feature diff --git a/news/87.feature b/news/87.feature new file mode 100644 index 0000000..3dfa33c --- /dev/null +++ b/news/87.feature @@ -0,0 +1 @@ +Add behavior IVersionable to Portal. @wesleybl