From de1e9b6ce3c2a4b0edeffbc4a6f32dd21b286eff Mon Sep 17 00:00:00 2001 From: Peter Holzer Date: Fri, 13 Sep 2019 09:01:54 +0200 Subject: [PATCH] Fix python3 related encoding error on manual purge page. --- news/51.bugfix | 2 ++ plone/app/caching/browser/controlpanel.py | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 news/51.bugfix diff --git a/news/51.bugfix b/news/51.bugfix new file mode 100644 index 0000000..d37cdc4 --- /dev/null +++ b/news/51.bugfix @@ -0,0 +1,2 @@ +Fix python3 related encoding error on manual purge page. +[agitator] \ No newline at end of file diff --git a/plone/app/caching/browser/controlpanel.py b/plone/app/caching/browser/controlpanel.py index a383038..e331e80 100644 --- a/plone/app/caching/browser/controlpanel.py +++ b/plone/app/caching/browser/controlpanel.py @@ -562,6 +562,11 @@ def processPurge(self): _(u'There were errors.'), 'error') return + if six.PY3: + urls = [x.decode('utf8') if isinstance(x, six.binary_type) + else x for x in urls + ] + purger = getUtility(IPurger) serverURL = self.request['SERVER_URL']