Skip to content

Commit

Permalink
[fc] Repository: plone.app.upgrade
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2017-10-11T01:05:00+02:00
Author: Maurits van Rees (mauritsvanrees) <[email protected]>
Commit: plone/plone.app.upgrade@4305ce0

Fixed WrongType exception when migrating installed Iterate to 5.0.

This mitigates the effects from plone/plone.app.upgrade#136

Files changed:
M CHANGES.rst
M plone/app/upgrade/v50/betas.py
Repository: plone.app.upgrade

Branch: refs/heads/master
Date: 2017-10-11T12:19:10+02:00
Author: Jens W. Klein (jensens) <[email protected]>
Commit: plone/plone.app.upgrade@7142a0c

Merge pull request #140 from plone/iterate-both-str-unicode

Fixed WrongType exception when migrating installed Iterate to 5.0.

Files changed:
M CHANGES.rst
M plone/app/upgrade/v50/betas.py
  • Loading branch information
jensens committed Oct 11, 2017
1 parent 87e4b74 commit 3e0d35b
Showing 1 changed file with 84 additions and 56 deletions.
140 changes: 84 additions & 56 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,92 +1,120 @@
Repository: Products.CMFPlone
Repository: plone.app.upgrade


Branch: refs/heads/master
Date: 2017-10-10T23:24:32+02:00
Date: 2017-10-11T01:05:00+02:00
Author: Maurits van Rees (mauritsvanrees) <[email protected]>
Commit: https://github.com/plone/Products.CMFPlone/commit/f54d45a566c0ecad9f7b78bbc9a693ba89df9dc4
Commit: https://github.com/plone/plone.app.upgrade/commit/4305ce058f08648232354cb0f78b02f9dd38b6fc

Fixed add-on listed as uninstalled when default profile is not the first.
Fixed WrongType exception when migrating installed Iterate to 5.0.

Fixes https://github.com/plone/Products.CMFPlone/issues/2166.
This mitigates the effects from https://github.com/plone/plone.app.upgrade/pull/136

Files changed:
M CHANGES.rst
M Products/CMFPlone/controlpanel/browser/quickinstaller.py
M plone/app/upgrade/v50/betas.py

diff --git a/CHANGES.rst b/CHANGES.rst
index 1a86e542a..137341e09 100644
index 4e70d97..47b6d40 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -22,6 +22,10 @@ New features:
@@ -14,7 +14,8 @@ New features:

Bug fixes:

+- Fixed add-on listed as uninstalled when the default profile is not the first alphabetically.
+ Fixes `issue 2166 <https://github.com/plone/Products.CMFPlone/issues/2166>`_.
-- *add item here*
+- Fixed WrongType exception when migrating installed Iterate to 5.0.
+ [maurits]
+
- Less variables: Fix calculation of screen max sizes.
Max sizes were two pixels too high.
[thet]
diff --git a/Products/CMFPlone/controlpanel/browser/quickinstaller.py b/Products/CMFPlone/controlpanel/browser/quickinstaller.py
index 49a73f0be..e5b109b97 100644
--- a/Products/CMFPlone/controlpanel/browser/quickinstaller.py
+++ b/Products/CMFPlone/controlpanel/browser/quickinstaller.py
@@ -548,7 +548,7 @@ def marshall_addons(self):
profile_type = pid_parts[-1]
if product_id not in addons:
# get some basic information on the product
- installed = self.is_profile_installed(pid)
+ installed = self.is_product_installed(product_id)
upgrade_info = {}
if installed:
upgrade_info = self.upgrade_info(product_id)


Repository: Products.CMFPlone


2.0.8 (2017-09-25)
diff --git a/plone/app/upgrade/v50/betas.py b/plone/app/upgrade/v50/betas.py
index 59412f4..c7a3487 100644
--- a/plone/app/upgrade/v50/betas.py
+++ b/plone/app/upgrade/v50/betas.py
@@ -17,6 +17,7 @@
from Products.CMFPlone.utils import safe_unicode
from zope.component import getUtility
from zope.component.hooks import getSite
+from zope.schema._bootstrapinterfaces import WrongType

import logging
import pkg_resources
@@ -570,7 +571,14 @@ def to50rc3(context):
value = site_properties.getProperty('checkout_workflow_policy')
from plone.app.iterate.interfaces import IIterateSettings
settings = registry.forInterface(IIterateSettings)
- settings.checkout_workflow_policy = str(value)
+ # Some versions of plone.app.iterate require a string here,
+ # others a unicode. Best seems to be to try both.
+ try:
+ # plone.app.iterate 3.3.2+
+ settings.checkout_workflow_policy = str(value)
+ except WrongType:
+ # plone.app.iterate 3.3.1-
+ settings.checkout_workflow_policy = safe_unicode(value)
site_properties._delProperty('checkout_workflow_policy')

if site_properties.hasProperty('default_page_types'):


Repository: plone.app.upgrade


Branch: refs/heads/master
Date: 2017-10-11T12:15:29+02:00
Date: 2017-10-11T12:19:10+02:00
Author: Jens W. Klein (jensens) <[email protected]>
Commit: https://github.com/plone/Products.CMFPlone/commit/f358830ebf653a4d22457d0d52ebc51dd20691ea
Commit: https://github.com/plone/plone.app.upgrade/commit/7142a0cc155ba129b9aa88f35d8ce257df9b4ff9

Merge pull request #2172 from plone/issue-2166-addon-uninstalled
Merge pull request #140 from plone/iterate-both-str-unicode

Fixed add-on listed as uninstalled when default profile is not the first
Fixed WrongType exception when migrating installed Iterate to 5.0.

Files changed:
M CHANGES.rst
M Products/CMFPlone/controlpanel/browser/quickinstaller.py
M plone/app/upgrade/v50/betas.py

diff --git a/CHANGES.rst b/CHANGES.rst
index 1a86e542a..137341e09 100644
index 4e70d97..47b6d40 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -22,6 +22,10 @@ New features:
@@ -14,7 +14,8 @@ New features:

Bug fixes:

+- Fixed add-on listed as uninstalled when the default profile is not the first alphabetically.
+ Fixes `issue 2166 <https://github.com/plone/Products.CMFPlone/issues/2166>`_.
-- *add item here*
+- Fixed WrongType exception when migrating installed Iterate to 5.0.
+ [maurits]
+
- Less variables: Fix calculation of screen max sizes.
Max sizes were two pixels too high.
[thet]
diff --git a/Products/CMFPlone/controlpanel/browser/quickinstaller.py b/Products/CMFPlone/controlpanel/browser/quickinstaller.py
index 49a73f0be..e5b109b97 100644
--- a/Products/CMFPlone/controlpanel/browser/quickinstaller.py
+++ b/Products/CMFPlone/controlpanel/browser/quickinstaller.py
@@ -548,7 +548,7 @@ def marshall_addons(self):
profile_type = pid_parts[-1]
if product_id not in addons:
# get some basic information on the product
- installed = self.is_profile_installed(pid)
+ installed = self.is_product_installed(product_id)
upgrade_info = {}
if installed:
upgrade_info = self.upgrade_info(product_id)


2.0.8 (2017-09-25)
diff --git a/plone/app/upgrade/v50/betas.py b/plone/app/upgrade/v50/betas.py
index 59412f4..c7a3487 100644
--- a/plone/app/upgrade/v50/betas.py
+++ b/plone/app/upgrade/v50/betas.py
@@ -17,6 +17,7 @@
from Products.CMFPlone.utils import safe_unicode
from zope.component import getUtility
from zope.component.hooks import getSite
+from zope.schema._bootstrapinterfaces import WrongType

import logging
import pkg_resources
@@ -570,7 +571,14 @@ def to50rc3(context):
value = site_properties.getProperty('checkout_workflow_policy')
from plone.app.iterate.interfaces import IIterateSettings
settings = registry.forInterface(IIterateSettings)
- settings.checkout_workflow_policy = str(value)
+ # Some versions of plone.app.iterate require a string here,
+ # others a unicode. Best seems to be to try both.
+ try:
+ # plone.app.iterate 3.3.2+
+ settings.checkout_workflow_policy = str(value)
+ except WrongType:
+ # plone.app.iterate 3.3.1-
+ settings.checkout_workflow_policy = safe_unicode(value)
site_properties._delProperty('checkout_workflow_policy')

if site_properties.hasProperty('default_page_types'):


0 comments on commit 3e0d35b

Please sign in to comment.