Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p.a.registry import broken #22

Open
rnixx opened this issue Feb 28, 2014 · 1 comment
Open

p.a.registry import broken #22

rnixx opened this issue Feb 28, 2014 · 1 comment
Labels

Comments

@rnixx
Copy link
Contributor

rnixx commented Feb 28, 2014

hi,

when exporting registry via GS and reimporting the result, following error occurs

Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module Products.GenericSetup.tool, line 565, in manage_importTarball
  Module Products.GenericSetup.tool, line 350, in runAllImportStepsFromProfile
  Module Products.GenericSetup.tool, line 1100, in _runImportStepsFromContext
  Module Products.GenericSetup.tool, line 1015, in _doRunImportStep
   - __traceback_info__: plone.app.registry
  Module plone.app.registry.exportimport.handler, line 49, in importRegistry
  Module plone.app.registry.exportimport.handler, line 92, in importDocument
  Module plone.app.registry.exportimport.handler, line 218, in importRecord
  Module plone.supermodel.utils, line 112, in elementToValue
  Module plone.supermodel.utils, line 123, in elementToValue
TypeError: ('Could not adapt', None, <InterfaceClass zope.schema._bootstrapinterfaces.IFromUnicode>)

exported XML looks like:

<record name="bda.plone.shop.interfaces.INotificationTextSettings.order_text" interface="bda.plone.shop.interfaces.INotificationTextSettings" field="order_text">
    <field type="plone.registry.field.List">
      <title>label_order_notification_text</title>
    </field>
    <value>
      <element>{'lang': 'de', 'text': u'lkj\xf6\xe4'}</element>
    </value>
</record>

Form schema is defined here - https://github.com/bluedynamics/bda.plone.shop/blob/master/src/bda/plone/shop/interfaces.py#L282

cheers

@djowett
Copy link

djowett commented Jun 16, 2015

@rnixx I believe you need to add <value_type type="XXX"/> within the <field> tag. However, I don't know what XXX should be...

@jensens jensens added the bug label Jul 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants