Home > Python > ReferenceField can not be searchable

ReferenceField can not be searchable

October 5th, 2004

Under Archectypes 1.3 (final), I had a ReferenceField setup with searchable=True and this caused a TypeError when saving the object:

Traceback (innermost last):
  Module ZPublisher.Publish, line 100, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 40, in call_object
  Module Products.CMFFormController.FSControllerPageTemplate, line 98, in __call__
  Module Products.CMFFormController.BaseControllerPageTemplate, line 39, in _call
  Module Products.CMFFormController.ControllerBase, line 191, in getNext
  Module Products.CMFFormController.Actions.TraverseTo, line 36, in __call__
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 40, in call_object
  Module Products.CMFFormController.FSControllerPythonScript, line 105, in __call__
  Module Products.CMFFormController.Script, line 141, in __call__
  Module Products.CMFCore.FSPythonScript, line 104, in __call__
  Module Shared.DC.Scripts.Bindings, line 306, in __call__
  Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
  Module Products.CMFCore.FSPythonScript, line 160, in _exec
  Module None, line 11, in content_edit
   - <fscontrollerpythonscript at /plone1/content_edit used for /plone1/organization.2004-10-04.8620291094>
   - Line 11
  Module Products.Archetypes.BaseObject, line 573, in processForm
  Module Products.Archetypes.BaseObject, line 566, in _processForm
   - __traceback_info__: (<organization at /plone1/organization.2004-10-04.8620291094>, <field Notes(text:rw)>, <bound method Organization.setNotes of <organization at /plone1/organization.2004-10-04.8620291094>>)
  Module Products.Archetypes.CatalogMultiplex, line 60, in reindexObject
  Module Products.CMFMember.CatalogTool, line 51, in catalog_object
  Module Products.ZCatalog.ZCatalog, line 513, in catalog_object
  Module Products.ZCatalog.Catalog, line 381, in catalogObject
  Module Products.ZCTextIndex.ZCTextIndex, line 163, in index_object
  Module Products.ZCTextIndex.ZCTextIndex, line 173, in _index_object
  Module Products.Archetypes.BaseObject, line 475, in SearchableText
  Module Products.Archetypes.BaseObject, line 475, in <lambda>
  Module Products.Archetypes.utils, line 276, in getValue
TypeError: DisplayList keys must be strings or ints, got <extension class Acquisition.ImplicitAcquirerWrapper at 775140>

The only reference to this that I’ve found is on the list. Setting searchable=False avoids the issue. I do not know if this is an actual bug.

Categories: Python Tags:
Comments are closed.