Hi, all. I'm having a similar problem that the described here[0] using the plone.app.registry version 1.0b1 and the versions part from http://good-py.appspot.com/release/plone.app.registry/1.0b1. The same happens with the release 1.0b2.
Both plone.app.registry and plone.app.z3cfom are installed in the plone site. I get the error[1] when I try to edit the my record trough the "Configuration registry" in the control panel. I did a test installing plone.app.discussion and they work without problems, so I believe that the problem is here :s I create the record with the xml definition[2] only but when I try to edit the record I get the same error[3] If anyone has an idea about what could be the problem or where I'm wrong I would be very grateful. Greetings and sorry for my English =) [0] http://plone.293351.n2.nabble.com/z3c-form-problem-td4964124.html ------------------- [1] Error log. 2010-06-03 22:29:15 ERROR Zope.SiteErrorLog 1275614955.520.900576711449 http://localhost:22500/Plone/portal_registry/edit/yaco.deliverancethemeselector.interfaces.IDeliveranceThemeSelectorSettings.availableThemes Traceback (innermost last): Module ZPublisher.Publish, line 127, in publish Module ZPublisher.mapply, line 77, in mapply Module ZPublisher.Publish, line 47, in call_object Module plone.z3cform.layout, line 64, in __call__ Module plone.z3cform.layout, line 54, in update Module plone.app.registry.browser.edit, line 23, in update Module z3c.form.form, line 208, in update Module plone.z3cform.patch, line 21, in BaseForm_update Module z3c.form.form, line 149, in update Module z3c.form.form, line 134, in updateWidgets Module z3c.form.field, line 257, in update Module zope.component._api, line 111, in getMultiAdapter ComponentLookupError: ((<plone.registry.field.Dict object at 0x2ae886579758>, <HTTPRequest, URL=http://localhost:22500/Plone/portal_registry/edit/yaco.deliverancethemeselector.interfaces.IDeliveranceThemeSelectorSettings.availableThemes>), <InterfaceClass z3c.form.interfaces.IFieldWidget>, u'') ---------------- # The interface.py from zope.interface import Interface from zope import schema class IDeliveranceThemeSelectorSettings(Interface): """Settings stored in the registry. """ availableThemes = schema.Dict( title = u"Available Themes", description = u"List of available themes to use with deliverance", key_type = schema.TextLine(title = u'Name'), value_type = schema.TextLine(title = u'Class'), ) ---------------- # The registry.xml <?xml version="1.0"?> <!-- <registry> <records interface="yaco.deliverancethemeselector.interfaces.IDeliveranceThemeSelectorSettings" /> </registry> ---------------- pdb in z3c/form/field.py ---------------- (Pdb) l 257 252 elif field.widgetFactory.get(mode) is not None: 253 factory = field.widgetFactory.get(mode) 254 widget = factory(field.field, self.request) 255 else: 256 try: 257 widget = zope.component.getMultiAdapter( 258 (field.field, self.request), interfaces.IFieldWidget) 259 except: 260 import pdb;pdb.set_trace() 261 # Step 3: Set the prefix for the widget 262 -> widget.name = prefix + shortName (Pdb) field.widgetFactory.get(mode) is not None False (Pdb) field.field <plone.registry.field.Dict object at 0x2aad9a6140c8> (Pdb) pp field.field.__dict__ {'_Element__tagged_values': {}, '__doc__': u'Available Themes\n\nList of available themes to use with deliverance', '__name__': 'value', 'default': None, 'description': u'List of available themes to use with deliverance', 'interface': <InterfaceClass yaco.deliverancethemeselector.interfaces.IDeliveranceThemeSelectorSettings>, 'key_type': <plone.registry.field.TextLine object at 0x2aad9a614230>, 'max_length': None, 'min_length': 0, 'readonly': False, 'required': True, 'title': u'Available Themes', 'value_type': <plone.registry.field.TextLine object at 0x2aad9a6142a8>} (Pdb) self.request <HTTPRequest, URL=http://localhost:22500/Plone/portal_registry/edit/yaco.deliverancethemeselector.interfaces.IDeliveranceThemeSelectorSettings.availableThemes> (Pdb) interfaces.IFieldWidget <InterfaceClass z3c.form.interfaces.IFieldWidget> (Pdb) zope.component.getMultiAdapter((field.field, self.request), interfaces.IFieldWidget) *** ComponentLookupError: ((<plone.registry.field.Dict object at 0x2aad9a6140c8>, <HTTPRequest, URL=http://localhost:22500/Plone/portal_registry/edit/yaco.deliverancethemeselector.interfaces.IDeliveranceThemeSelectorSettings.availableThemes>), <InterfaceClass z3c.form.interfaces.IFieldWidget>, u'') ------------------------------ [2] registry.xml <?xml version="1.0"?> <registry> <record name="yaco.deliverancethemeselector.DeliveranceThemeSelectorSettings"> <field type="plone.registry.field.Dict"> <title>Available Themes</title> <description>List of available themes to use with deliverance</description> <key_type type="plone.registry.field.TextLine" /> <value_type type="plone.registry.field.TextLine" /> </field> <value> <element key="Dog">Dog food</element> <element key="Cat">Cat food</element> <element key="Elephant">Squirrels</element> </value> </record> </registry> ---------------------- [3] error log 2010-06-03 23:56:32 ERROR Zope.SiteErrorLog 1275620192.90.162819384131 http://localhost:22500/Plone/portal_registry/edit/yaco.deliverancethemeselector.DeliveranceThemeSelectorSettings Traceback (innermost last): Module ZPublisher.Publish, line 127, in publish Module ZPublisher.mapply, line 77, in mapply Module ZPublisher.Publish, line 47, in call_object Module plone.z3cform.layout, line 64, in __call__ Module plone.z3cform.layout, line 54, in update Module plone.app.registry.browser.edit, line 23, in update Module z3c.form.form, line 208, in update Module plone.z3cform.patch, line 21, in BaseForm_update Module z3c.form.form, line 149, in update Module z3c.form.form, line 134, in updateWidgets Module z3c.form.field, line 258, in update Module zope.component._api, line 111, in getMultiAdapter ComponentLookupError: ((<plone.registry.field.Dict object at 0x2aaaab1d0500>, <HTTPRequest, URL=http://localhost:22500/Plone/portal_registry/edit/yaco.deliverancethemeselector.DeliveranceThemeSelectorSettings>), <InterfaceClass z3c.form.interfaces.IFieldWidget>, u'') -- nueces... _______________________________________________ Product-Developers mailing list [email protected] http://lists.plone.org/mailman/listinfo/product-developers
