From 6bab181c2ad6b35ccdf56dce46c0ee0bd541ca4c Mon Sep 17 00:00:00 2001 From: Sune Broendum Woeller Date: Thu, 6 Sep 2018 16:38:29 +0200 Subject: [PATCH 1/3] remove the jquery-highlightsearchterms resource, and the - now empty - plone_ecmascript skin layer. See https://github.com/plone/Products.CMFPlone/pull/1963/commits and https://github.com/plone/Products.CMFPlone/issues/1811 https://github.com/plone/Products.CMFPlone/issues/1801 removing records (wip) remove jquery-highlightsearchterms from the plone-legacy bundle c --- CHANGES.rst | 3 +++ plone/app/upgrade/v52/alphas.py | 8 +++++++ .../v52/profiles/to_alpha1/registry.xml | 24 +++++++++++++++++++ .../upgrade/v52/profiles/to_alpha1/skins.xml | 8 +++++++ 4 files changed, 43 insertions(+) create mode 100644 plone/app/upgrade/v52/profiles/to_alpha1/registry.xml diff --git a/CHANGES.rst b/CHANGES.rst index a2d6039e..52b6a681 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -13,6 +13,9 @@ New features: - Add upgrade steps for Datatbles on Plone 5.1.4 [frapell] +- Add upgrade step removing the jquery-highlightsearchterms resource + and the plone_ecmascript skin layer, on Plone 5.2 + Bug fixes: - *add item here* diff --git a/plone/app/upgrade/v52/alphas.py b/plone/app/upgrade/v52/alphas.py index 774a4b9d..972ee8a7 100644 --- a/plone/app/upgrade/v52/alphas.py +++ b/plone/app/upgrade/v52/alphas.py @@ -1,7 +1,9 @@ # -*- coding: utf-8 -*- from plone.app.upgrade.utils import cleanUpSkinsTool from plone.app.upgrade.utils import loadMigrationProfile +from plone.registry.interfaces import IRegistry from Products.CMFCore.utils import getToolByName +from zope.component import getUtility import logging @@ -13,3 +15,9 @@ def to52alpha1(context): loadMigrationProfile(context, 'profile-plone.app.upgrade.v52:to52alpha1') portal = getToolByName(context, 'portal_url').getPortalObject() cleanUpSkinsTool(portal) + + registry = getUtility(IRegistry) + record = 'plone.bundles/plone-legacy.resources' + resources = registry.records[record] + if u'jquery-highlightsearchterms' in resources.value: + resources.value.remove(u'jquery-highlightsearchterms') diff --git a/plone/app/upgrade/v52/profiles/to_alpha1/registry.xml b/plone/app/upgrade/v52/profiles/to_alpha1/registry.xml new file mode 100644 index 00000000..7a2f4c07 --- /dev/null +++ b/plone/app/upgrade/v52/profiles/to_alpha1/registry.xml @@ -0,0 +1,24 @@ + + + + + + + + + + 2018-09-06 00:00:00 + + + 2018-09-06 00:00:00 + + + diff --git a/plone/app/upgrade/v52/profiles/to_alpha1/skins.xml b/plone/app/upgrade/v52/profiles/to_alpha1/skins.xml index c0d3ddf6..12509b31 100644 --- a/plone/app/upgrade/v52/profiles/to_alpha1/skins.xml +++ b/plone/app/upgrade/v52/profiles/to_alpha1/skins.xml @@ -8,4 +8,12 @@ + + + + From c979968ea4122e496a0fcd368dbd01dbea443d69 Mon Sep 17 00:00:00 2001 From: Sune Broendum Woeller Date: Thu, 6 Sep 2018 19:44:35 +0200 Subject: [PATCH 2/3] Also remove the jquery-highlightsearchterms resource, and the plone_ecmascript skin layer for plone 5.1.4 --- CHANGES.rst | 2 +- plone/app/upgrade/v51/configure.zcml | 2 +- plone/app/upgrade/v51/final.py | 14 ++++++++++++++ plone/app/upgrade/v51/profiles/to_514/registry.xml | 9 +++++++-- plone/app/upgrade/v51/profiles/to_514/skins.xml | 11 +++++++++++ 5 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 plone/app/upgrade/v51/profiles/to_514/skins.xml diff --git a/CHANGES.rst b/CHANGES.rst index 52b6a681..45c9b7e6 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -14,7 +14,7 @@ New features: [frapell] - Add upgrade step removing the jquery-highlightsearchterms resource - and the plone_ecmascript skin layer, on Plone 5.2 + and the plone_ecmascript skin layer, on Plone 5.2 and 5.1.4 Bug fixes: diff --git a/plone/app/upgrade/v51/configure.zcml b/plone/app/upgrade/v51/configure.zcml index a56c241f..113678a9 100644 --- a/plone/app/upgrade/v51/configure.zcml +++ b/plone/app/upgrade/v51/configure.zcml @@ -265,7 +265,7 @@ Add image scaling options to image handling control panel. diff --git a/plone/app/upgrade/v51/final.py b/plone/app/upgrade/v51/final.py index c6e9a498..8960caea 100644 --- a/plone/app/upgrade/v51/final.py +++ b/plone/app/upgrade/v51/final.py @@ -1,6 +1,9 @@ # -*- coding: utf-8 -*- +from plone.app.upgrade.utils import cleanUpSkinsTool +from plone.registry.interfaces import IRegistry from Products.CMFCore.utils import getToolByName from zExceptions import BadRequest +from zope.component import getUtility import logging @@ -38,3 +41,14 @@ def fix_i18n_domain(context): 'Action object/%s does not have an i18n_domain property', action_id, ) + + +def remove_highlightsearchterms(context): + portal = getToolByName(context, 'portal_url').getPortalObject() + cleanUpSkinsTool(portal) + + registry = getUtility(IRegistry) + record = 'plone.bundles/plone-legacy.resources' + resources = registry.records[record] + if u'jquery-highlightsearchterms' in resources.value: + resources.value.remove(u'jquery-highlightsearchterms') diff --git a/plone/app/upgrade/v51/profiles/to_514/registry.xml b/plone/app/upgrade/v51/profiles/to_514/registry.xml index 83ad3c05..1b660148 100644 --- a/plone/app/upgrade/v51/profiles/to_514/registry.xml +++ b/plone/app/upgrade/v51/profiles/to_514/registry.xml @@ -105,18 +105,23 @@ ++plone++static/components/datatables.net-select/js/dataTables.select.min.js + + + - 2018-07-10 00:00:00 + 2018-09-06 00:00:00 - 2018-07-10 00:00:00 + 2018-09-06 00:00:00 diff --git a/plone/app/upgrade/v51/profiles/to_514/skins.xml b/plone/app/upgrade/v51/profiles/to_514/skins.xml new file mode 100644 index 00000000..3e7c38da --- /dev/null +++ b/plone/app/upgrade/v51/profiles/to_514/skins.xml @@ -0,0 +1,11 @@ + + + + + + + From 0c1c1ee77c3492da2d3bb74b65e0d6e714c6133c Mon Sep 17 00:00:00 2001 From: Sune Broendum Woeller Date: Sat, 8 Sep 2018 12:26:59 +0200 Subject: [PATCH 3/3] Update the compilation date of the plone-legacy bundle, to force recompilation --- .../app/upgrade/v51/profiles/to_514/registry.xml | 6 ++++++ .../upgrade/v52/profiles/to_alpha1/registry.xml | 16 ++++------------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/plone/app/upgrade/v51/profiles/to_514/registry.xml b/plone/app/upgrade/v51/profiles/to_514/registry.xml index 1b660148..ef3704aa 100644 --- a/plone/app/upgrade/v51/profiles/to_514/registry.xml +++ b/plone/app/upgrade/v51/profiles/to_514/registry.xml @@ -124,4 +124,10 @@ 2018-09-06 00:00:00 + + + + + diff --git a/plone/app/upgrade/v52/profiles/to_alpha1/registry.xml b/plone/app/upgrade/v52/profiles/to_alpha1/registry.xml index 7a2f4c07..6582f962 100644 --- a/plone/app/upgrade/v52/profiles/to_alpha1/registry.xml +++ b/plone/app/upgrade/v52/profiles/to_alpha1/registry.xml @@ -7,18 +7,10 @@ remove="True"> - - - 2018-09-06 00:00:00 - - - 2018-09-06 00:00:00 + + +