Hi folks:
I have a Dexterity type with this field:
rdfDataSources = schema.List(
title=_(u'RDF Data Sources'),
description=_(u'URLs to sources of Resource Description Format (RDF) data.'),
required=False,
value_type=schema.URI(
title=_(u'RDF Data Source'),
description=_(u'URL to a source of Resource Description Format data that mandates the contents of this folder.'),
required=False,
)
)
After upgrading to Plone 5.2.2, when people edit an instance of this custom type, they're now getting a stack trace:
TypeError: 'int' object is not callable
- Expression: "et python:view.key_widgets[repeat['widget'].index"
- Filename: ... 2.1-py2.7.egg/plone/app/z3cform/templates/multi_input.pt
- Location: (line 7: col 33)
- Source: ... ey_widget python:view.key_widgets[repeat['widget'].index()];
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Expression: "widget/render"
- Filename: ... rm-3.2.1-py2.7.egg/plone/app/z3cform/templates/widget.pt
- Location: (line 39: col 46)
- Source: ... xt" tal:replace="structure widget/render"
^^^^^^^^^^^^^
- Expression: "widget/@@ploneform-render-widget"
- Filename: ... rm-3.2.1-py2.7.egg/plone/app/z3cform/templates/macros.pt
- Location: (line 99: col 81)
- Source: ... place="structure widget/@@ploneform-render-widget"/>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Expression: "context/@@ploneform-macros/titlelessform"
- Filename: ... 1.3-py2.7.egg/plone/z3cform/pagetemplates/wrappedform.pt
- Location: (line 1: col 22)
- Source: ... e use-macro="context/@@ploneform-macros/titlelessform" />
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Arguments: widget: <URIWidget 'form.widgets.rdfDataSources.0'>
repeat: <Products.PageTemplates.engine.RepeatDictWrapper object at 0x111b87d70>
context: <Container at /edrn/publications>
views: <zope.browserpage.viewpagetemplatefile.ViewMapper object at 0x112913890>
modules: <zope.pagetemplate.engine.TraversableModuleImporter object at 0x10eb21090>
args: ()
attrs: {}
nothing: None
target_language: None
default: <DEFAULT>
request: <WSGIRequest, URL=http://localhost:6468/edrn/publications/@@edit>
loop: {u'widget': <Products.PageTemplates.engine.RepeatItem object at 0x1152818d0>}
template: <zope.browserpage.viewpagetemplatefile.ViewPageTemplateFile object at 0x1121cedd0>
translate: <function translate at 0x11529b230>
options: {}
view: <MultiWidget 'form.widgets.rdfDataSources'>
Changing the value_type
in the schema.List
to schema.TextLine
is a workaround—although the user interface presented isn't quite the same
Curiously, bare schema.URI
fields work fine:
subjectURI = schema.URI(
title=_(u'Subject URI Prefix'),
description=_(u'RDF subject Uniform Resource Identifier to prefix for objects described here.'),
required=True,
)
but inside a list, forget about it!
Have I been doing schema.List
s wrong? Is Plone 5.2.2 enforcing something I've been skating under the radar with for some time? Or is this maybe a teensy little regression?
Thanks!