collective / collective/archetypes.uploadreferencewidget

AttributeError: __contains__

Open
#1 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Got this exception trying to upload a new file from an archetypes.schemaextender field.
Plone version: Plone 4.1.6

Code:
class MyReferenceField(ExtensionField, ReferenceField):
"""A trivial field."""

class MetadataExtender(object):
adapts(IATDocument)
implements(ISchemaExtender)

```
fields = [
MyReferenceField("file_1",
required = False,
languageIndependent = True,
schemata = 'metadata',
relationship = 'file_1',
allowed_types = ('File',),
widget = UploadReferenceWidget(
label = u'File 1',
description=u'',
visible={'view' : 'hidden',
'edit' : 'visible'},
),
```

...

Traceback:
2013-07-23 12:13:55 ERROR Zope.SiteErrorLog 1374574435.410.686478519392 http://localhost:8080/test/test-1/atct_edit
Traceback (innermost last):
Module ZPublisher.Publish, line 60, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module Products.CMFFormController.FSControllerPageTemplate, line 91, in **call**
Module Products.CMFFormController.BaseControllerPageTemplate, line 28, in _call
Module Products.CMFFormController.ControllerBase, line 231, in getNext
Module Products.CMFFormController.Actions.TraverseTo, line 38, in __call__
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module Products.CMFFormController.FSControllerPythonScript, line 107, in **call**
Module Products.CMFFormController.ControllerBase, line 231, in getNext
Module Products.CMFFormController.Actions.TraverseTo, line 38, in **call**
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module Products.CMFFormController.FSControllerPythonScript, line 105, in **call**
Module Products.CMFFormController.Script, line 145, in **call**
Module Products.CMFCore.FSPythonScript, line 127, in **call**
Module Shared.DC.Scripts.Bindings, line 322, in **call**
Module Products.PloneHotfix20130618.spamProtect, line 35, in _patched_bindAndExec
Module Products.PloneHotfix20121106.python_scripts, line 63, in _patched_bindAndExec
Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
Module Products.PythonScripts.PythonScript, line 344, in _exec
Module script, line 1, in content_edit
-
- Line 1
Module Products.CMFCore.FSPythonScript, line 127, in **call**
Module Shared.DC.Scripts.Bindings, line 322, in **call**
Module Products.PloneHotfix20130618.spamProtect, line 35, in _patched_bindAndExec
Module Products.PloneHotfix20121106.python_scripts, line 63, in _patched_bindAndExec
Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
Module Products.PythonScripts.PythonScript, line 344, in _exec
Module script, line 13, in content_edit_impl
-
- Line 13
Module Products.LinguaPlone.I18NBaseObject, line 421, in processForm
Module Products.Archetypes.BaseObject, line 658, in processForm
Module Products.LinguaPlone.I18NBaseObject, line 391, in _processForm
- **traceback_info**: (, , >)
Module archetypes.uploadreferencewidget.widget, line 111, in process_form
Module Products.Archetypes.BaseObject, line 755, in _renameAfterCreation
Module Products.CMFCore.FSPythonScript, line 127, in __call__
Module Shared.DC.Scripts.Bindings, line 322, in **call**
Module Products.PloneHotfix20130618.spamProtect, line 35, in _patched_bindAndExec
Module Products.PloneHotfix20121106.python_scripts, line 63, in _patched_bindAndExec
Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
Module Products.PythonScripts.PythonScript, line 344, in _exec
Module script, line 110, in check_id
-
- Line 110
AttributeError: **contains**

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.