Skip to content

Commit

Permalink
Added uninstall profile.
Browse files Browse the repository at this point in the history
The Collection type is removed when you uninstall this package.
  • Loading branch information
mauritsvanrees committed Apr 8, 2016
1 parent ff7fe75 commit 2b7f142
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Incompatibilities:

New:

- *add item here*
- Added uninstall profile. The Collection type is removed when you
uninstall this package. [maurits]

Fixes:

Expand Down
10 changes: 9 additions & 1 deletion plone/app/collection/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<include package="plone.app.querystring" />
<include package="plone.app.contentlisting" />
<include package=".browser" />

<genericsetup:registerProfile
name="default"
title="plone.app.collection"
Expand All @@ -18,6 +18,14 @@
provides="Products.GenericSetup.interfaces.EXTENSION"
/>

<genericsetup:registerProfile
name="uninstall"
title="plone.app.collection"
directory="profiles/uninstall"
description="Archetypes-based collections (uninstall)"
provides="Products.GenericSetup.interfaces.EXTENSION"
/>

<!-- hide profiles for our widget/field dependencies -->
<utility
factory=".integration.HiddenProfiles"
Expand Down
2 changes: 1 addition & 1 deletion plone/app/collection/profiles/default/types.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<object name="portal_types">
<!-- We remove the existing FTI since itcould be Dexterity-based and would
<!-- We remove the existing FTI since it could be Dexterity-based and would
not be compatible in that case. You get this error when installing:
ValueError: undefined property 'content_meta_type' -->
<object name="Collection" remove="True"/>
Expand Down
4 changes: 4 additions & 0 deletions plone/app/collection/profiles/uninstall/types.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0"?>
<object name="portal_types">
<object name="Collection" remove="True"/>
</object>

0 comments on commit 2b7f142

Please sign in to comment.