From 31dba25f4dc9ca0accf474fa828ba3773f115a6a Mon Sep 17 00:00:00 2001 From: Peter Holzer Date: Wed, 13 Jun 2018 13:42:12 +0200 Subject: [PATCH 1/3] Update resources for plone.app.event changelog --- CHANGES.rst | 2 ++ plone/app/upgrade/v51/configure.zcml | 12 ++++++--- plone/app/upgrade/v51/final.py | 8 ++++++ plone/app/upgrade/v51/profiles.zcml | 9 +++++++ .../upgrade/v51/profiles/to_513/registry.xml | 26 +++++++++++++++++++ 5 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 plone/app/upgrade/v51/profiles/to_513/registry.xml diff --git a/CHANGES.rst b/CHANGES.rst index 45c9b7e6..dfc7248c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -20,6 +20,8 @@ Bug fixes: - *add item here* +- Update resources for plone.app.event. [agitator] + 2.0.15 (2018-06-21) ------------------- diff --git a/plone/app/upgrade/v51/configure.zcml b/plone/app/upgrade/v51/configure.zcml index 113678a9..ad19471b 100644 --- a/plone/app/upgrade/v51/configure.zcml +++ b/plone/app/upgrade/v51/configure.zcml @@ -243,12 +243,18 @@ Add image scaling options to image handling control panel. destination="5113" profile="Products.CMFPlone:plone"> + + + + + + + + + + + + + + + + ++plone++plone.app.event/event.js + + + + + plone-app-event + + + + + From 8d0289686dbe54e08c74919240f3f84ebf18ea70 Mon Sep 17 00:00:00 2001 From: Sune Broendum Woeller Date: Thu, 13 Sep 2018 12:08:01 +0200 Subject: [PATCH 2/3] Dont fail if resource is already removed --- plone/app/upgrade/v51/final.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plone/app/upgrade/v51/final.py b/plone/app/upgrade/v51/final.py index 0218a3b5..1866708a 100644 --- a/plone/app/upgrade/v51/final.py +++ b/plone/app/upgrade/v51/final.py @@ -57,6 +57,8 @@ def remove_highlightsearchterms(context): def remove_old_PAE_rescources(context): # noqa """FORCE remove old p.a.event resources""" registry = getUtility(IRegistry) - plone_legacy = registry.records['plone.bundles/plone-legacy.resources'] - plone_legacy.value.remove('resource-plone-app-event-event-js') - plone_legacy.value.remove('resource-plone-app-event-event-css') + resources = registry.records['plone.bundles/plone-legacy.resources'] + if u'resource-plone-app-event-event-js' in resources.value: + resources.value.remove('resource-plone-app-event-event-js') + if u'resource-plone-app-event-event-css' in resources.value: + resources.value.remove('resource-plone-app-event-event-css') From c10780ef301016bde82bfba24f74ea6503de58d1 Mon Sep 17 00:00:00 2001 From: Sune Broendum Woeller Date: Thu, 13 Sep 2018 21:38:17 +0200 Subject: [PATCH 3/3] install plone.resource on upgrade, we need the portal_resources folder --- plone/app/upgrade/v50/alphas.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plone/app/upgrade/v50/alphas.py b/plone/app/upgrade/v50/alphas.py index 9ebc6d72..2b1a8de4 100644 --- a/plone/app/upgrade/v50/alphas.py +++ b/plone/app/upgrade/v50/alphas.py @@ -74,6 +74,8 @@ def to50alpha1(context): qi = getToolByName(portal, 'portal_quickinstaller') else: qi = get_installer(portal) + if not qi.isProductInstalled('plone.resource'): + qi.installProduct('plone.resource') if not qi.isProductInstalled('plone.app.event'): qi.installProduct('plone.app.event')