Open Gagaro opened 7 years ago
I just tested this on a completely vanilla Plone and I got a list of str instead of unicode (as I have in my other project). So I'm not sure what's wrong. I'll keep this issue updated.
Ok so I actually had lxml 4.0.0 on the vanilla Plone and 3.7.3 on the project one.
I updated it and I now get a str
. But the values stored in the registry are still unicode so the import still fails.
A Workaround for me in the Registry, is purge the Values via Attribute.
<record
interface="Products.CMFPlone.interfaces.IDateAndTimeSchema"
prefix="plone"
field ="available_timezones">
<value purge="True">
<element>Europe/Berlin</element>
</value>
</record>
BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)
What I did:
Run an upgrade with a
registry.xml
import (this one).What I expect to happen:
The registry is imported without issue.
What actually happened:
I got a
WrongContainedType
:What version of Plone/ Addons I am using:
Plone 5.1rc1
More information
For what I gathered, the issue comes because the expected type is
str
while we haveunicode
. The string imported from the registry.xml file are alwaysunicode
. Thestr
type come from the vocabulary in the xml.The type of a
Choice
record is supposed to beNone
. But when a vocabulary is defined, the type is determined from it (relevant code).I don't remember having this issue before. I'm not sure what the right fix should be.