Python 3 (but same or similar problem on Python 2).
Create fresh site.
Go to Configuration Registry and search for plone.site_logo.
Upload an image here and save. I chose a PNG.
What I expect to happen:
Logo is shown.
What actually happened:
No logo is shown.
Instead at the top of the page you see "error while rendering plone.header"
Traceback:
Traceback (most recent call last):
File "/Users/maurits/shared-eggs/cp38/Chameleon-3.8.1-py3.8.egg/chameleon/template.py", line 192, in render
self._render(stream, econtext, rcontext)
File "/Users/maurits/community/plone-coredev/py3/var/cache/7a4dbf62a3f320b68f6c7a0d24b5f9a6.py", line 118, in render
__cache_4573067728 = _static_4567212624('provider', 'plone.portalheader', econtext=econtext)(_static_4567212432(econtext, __zt_tmp))
File "/Users/maurits/shared-eggs/cp38/zope.contentprovider-4.2.1-py3.8.egg/zope/contentprovider/tales.py", line 76, in __call__
provider.update()
File "/Users/maurits/shared-eggs/cp38/zope.viewlet-4.2.1-py3.8.egg/zope/viewlet/manager.py", line 155, in update
self._updateViewlets()
File "/Users/maurits/shared-eggs/cp38/zope.viewlet-4.2.1-py3.8.egg/zope/viewlet/manager.py", line 161, in _updateViewlets
viewlet.update()
File "/Users/maurits/shared-eggs/cp38/plone.app.layout-3.4.6-py3.8.egg/plone/app/layout/viewlets/common.py", line 227, in update
self.img_src = getSiteLogo()
File "/Users/maurits/community/plone-coredev/py3/src/Products.CMFPlone/Products/CMFPlone/utils.py", line 776, in getSiteLogo
filename, data = b64decode_file(settings.site_logo)
File "/Users/maurits/shared-eggs/cp38/plone.formwidget.namedfile-2.1.0-py3.8.egg/plone/formwidget/namedfile/converter.py", line 77, in b64decode_file
filename, data = value.split(b';')
ValueError: too many values to unpack (expected 2)
I have also seen "not enough values to unpack". I am not sure if the difference is for using Python 2 instead, or because I uploaded an SVG then.
Searching for the site logo again in the config registry I see a value starting with PNG IHDR ' e@4 sRGB... or for SVG: filenameb64:....
What version of Plone/ Addons I am using:
Coredev 5.2, Python 2.7 or 3.8.
Alternative steps to take:
On a fresh Plone Site first go to the Site control panel and upload an image there.
Go to Configuration Registry and search for plone.site_logo.
The field shows contents.
Go to the edit form of the field and you see no current image.
Upload an image and get the same problem.
The traceback suggests this should be fixed in plone.formwidget.namedfile, but maybe the error is elsewhere in the stack.
BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)
This is split off from my comment on site logo migration. But for clarity I make this an issue with a fresh Plone Site.
What I did:
plone.site_logo
.What I expect to happen:
Logo is shown.
What actually happened:
I have also seen "not enough values to unpack". I am not sure if the difference is for using Python 2 instead, or because I uploaded an SVG then.
Searching for the site logo again in the config registry I see a value starting with
PNG IHDR ' e@4 sRGB...
or for SVG:filenameb64:...
.What version of Plone/ Addons I am using:
Coredev 5.2, Python 2.7 or 3.8.
Alternative steps to take:
plone.site_logo
.The traceback suggests this should be fixed in
plone.formwidget.namedfile
, but maybe the error is elsewhere in the stack.