Skip to content

Commit

Permalink
hide broken resource
Browse files Browse the repository at this point in the history
  • Loading branch information
cekk committed Feb 7, 2024
1 parent bc776bc commit 06170c1
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 108 deletions.
3 changes: 0 additions & 3 deletions constraints_plone51.txt

This file was deleted.

3 changes: 0 additions & 3 deletions constraints_plone52.txt

This file was deleted.

7 changes: 7 additions & 0 deletions src/rer/newsletter/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@
post_handler=".setuphandlers.post_install"
/>

<genericsetup:registerProfile
name="plone5"
title="rer.newsletter: Plone5 profile"
description="Installs the rer.newsletter profile for Plone5."
provides="Products.GenericSetup.interfaces.EXTENSION"
directory="profiles/plone5"
/>
<genericsetup:registerProfile
name="uninstall"
title="rer.newsletter (uninstall)"
Expand Down
19 changes: 0 additions & 19 deletions src/rer/newsletter/profiles/default/registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,6 @@

<records interface="rer.newsletter.browser.settings.ISettingsSchema" />

<records interface="Products.CMFPlone.interfaces.IResourceRegistry"
prefix="plone.resources/initializedModal"
>
<value key="js">++plone++rer.newsletter/scripts/prod/initializedModal.min.js</value>
</records>
<records interface="Products.CMFPlone.interfaces.IBundleRegistry"
prefix="plone.bundles/initializedModal"
>
<value key="resources"
purge="false"
>
<element>initializedModal</element>
</value>
<value key="enabled">True</value>
<value key="jscompilation">++plone++rer.newsletter/scripts/prod/initializedModal.min.js</value>
<value key="compile">True</value>
</records>


<records interface="Products.CMFPlone.interfaces.IResourceRegistry"
prefix="plone.resources/datatables"
>
Expand Down
23 changes: 23 additions & 0 deletions src/rer/newsletter/profiles/plone5/registry.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<registry xmlns:i18n="http://xml.zope.org/namespaces/i18n"
i18n:domain="rer.newsletter"
>

<!-- this resource breaks plone6 rresource registry, needs to be fixed or dropped -->
<records interface="Products.CMFPlone.interfaces.IResourceRegistry"
prefix="plone.resources/initializedModal"
>
<value key="js">++plone++rer.newsletter/scripts/prod/initializedModal.min.js</value>
</records>
<records interface="Products.CMFPlone.interfaces.IBundleRegistry"
prefix="plone.bundles/initializedModal"
>
<value key="resources"
purge="false"
>
<element>initializedModal</element>
</value>
<value key="enabled">True</value>
<value key="jscompilation">++plone++rer.newsletter/scripts/prod/initializedModal.min.js</value>
<value key="compile">True</value>
</records>
9 changes: 8 additions & 1 deletion src/rer/newsletter/setuphandlers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from .transforms.link_transform import link_transform
from .transforms.mimetype import mail
from plone import api
from Products.CMFPlone.interfaces import INonInstallable
from Products.MimetypesRegistry.interfaces import IMimetypesRegistryTool
from Products.PortalTransforms.interfaces import IPortalTransformsTool
Expand All @@ -12,7 +13,7 @@
class HiddenProfiles(object):
def getNonInstallableProfiles(self):
"""Hide uninstall profile from site-creation and quickinstaller"""
return ["rer.newsletter:uninstall"]
return ["rer.newsletter:uninstall", "rer.newsletter:plone5"]


def post_install(context):
Expand All @@ -26,6 +27,12 @@ def post_install(context):
pt = getUtility(IPortalTransformsTool)
pt.registerTransform(link_transform())

if api.env.plone_version() < "6.0":
setup_tool = api.portal.get_tool("portal_setup")
setup_tool.runImportStepFromProfile(
"profile-rer.newsletter:plone5", "plone.app.registry"
)


def uninstall(context):
"""Uninstall script"""
Expand Down
16 changes: 0 additions & 16 deletions test_plone51.cfg

This file was deleted.

46 changes: 0 additions & 46 deletions test_plone52.cfg

This file was deleted.

31 changes: 11 additions & 20 deletions test_plone60.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,22 @@ update-versions-file = test_plone60.cfg

[versions]

# Added by buildout at 2023-03-13 12:26:40.153347
build = 0.10.0
coverage = 7.2.1
# Added by buildout at 2024-01-18 15:47:19.411566
coverage = 7.3.2
createcoverage = 1.5
flake8 = 6.0.0
i18ndude = 5.5.0
flake8 = 6.1.0
flake8-coding = 1.3.2
flake8-debugger = 4.1.2
flake8-print = 5.0.0
mccabe = 0.7.0
plone.recipe.codeanalysis = 3.0.1
pycodestyle = 2.10.0
pyflakes = 3.0.1
pyproject-hooks = 1.0.0

# Required by:
# plone.recipe.codeanalysis==3.0.1
check-manifest = 0.49
pyflakes = 3.1.0

# Required by:
# premailer==3.1.1
cssutils = 2.6.0
cssutils = 2.9.0

# Required by:
# mailmanclient==3.1
httplib2 = 0.21.0

# Added by buildout at 2023-03-13 22:54:56.233970
flake8-coding = 1.3.2
flake8-debugger = 4.1.2
flake8-print = 5.0.0
# flake8-debugger==4.1.2
# flake8-print==5.0.0
pycodestyle = 2.11.0

0 comments on commit 06170c1

Please sign in to comment.