Skip to content

Commit

Permalink
change cookie plugin: collective.volto.cookieconsent => collective.vo…
Browse files Browse the repository at this point in the history
…lto.gdprcookie
  • Loading branch information
cekk committed Mar 28, 2024
1 parent ff608ee commit 9e090d3
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
5 changes: 4 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ Changelog
[cekk]
- Add flag in controlpanel to enable/disable INameChooser customization.
[cekk]

- Uninstall collective.volto.cookieconsent (deprecated). Will be removed from dependencies in next releases.
[cekk]
- Add dependency to collective.volto.gdprcookie and install it by default.
[cekk]

5.4.8 (2024-03-19)
------------------
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
python_requires=">=3.7",
install_requires=[
"setuptools",
"collective.volto.cookieconsent",
"collective.volto.cookieconsent", # this will be uninstalled and removed soon.
"collective.volto.gdprcookie",
"collective.monkeypatcher",
"collective.purgebyid",
"kitconcept.seo>=2.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/redturtle/volto/profiles/default/metadata.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<version>4304</version>
<version>4305</version>
<dependencies>
<dependency>profile-plone.volto:default</dependency>
<dependency>profile-plone.app.caching:with-caching-proxy</dependency>
<dependency>profile-collective.volto.cookieconsent:default</dependency>
<dependency>profile-collective.volto.gdprcookie:default</dependency>
<dependency>profile-kitconcept.seo:default</dependency>
</dependencies>
</metadata>
9 changes: 9 additions & 0 deletions src/redturtle/volto/upgrades.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from redturtle.volto.setuphandlers import remove_custom_googlebot
from uuid import uuid4
from zope.schema import getFields
from plone.base.utils import get_installer

import json
import logging
Expand Down Expand Up @@ -494,3 +495,11 @@ def to_4303(context):
for brain in brains:
event = brain.getObject()
event.reindexObject(idxs=["start", "end"])


def to_4305(context):
portal = api.portal.get()
installer = get_installer(portal, portal.REQUEST)
installer.uninstall_product(product_id="collective.volto.cookieconsent")
if not installer.is_product_installed("collective.volto.gdprcookie"):
installer.install_(product_id="collective.volto.gdprcookie")
8 changes: 8 additions & 0 deletions src/redturtle/volto/upgrades.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,12 @@
destination="4304"
handler=".upgrades.update_registry"
/>
<genericsetup:upgradeStep
title="Remove old cookie plugin and install new one"
description=""
profile="redturtle.volto:default"
source="4304"
destination="4305"
handler=".upgrades.to_4305"
/>
</configure>

0 comments on commit 9e090d3

Please sign in to comment.