[Zope] CMF: Fields not available in objects found by catalog search?

Dieter Maurer dieter at handshake.de
Thu Sep 18 14:58:28 EDT 2003


Ian Beatty wrote at 2003-9-17 20:32 -0400:
 > ...
 > However, not all of the Event type's fields seem to be available. If I try
 > to access "location" or "contact_name" (or "Location" or "ContactName"), I
 > get a KeyError. No such field.
 > 
 > What gives? Why are some fields not accessible? And where can I hack
 > something to make them accessible?

Are you sure, you try to access them on the "getObject()" result.
This is your true object, it should have the attributes
(if it is of the expected type).

The basic search hit (the catalog search returns a sequence of them),
on the other hand, only has attributes corresponding to
the "Metadata" defined for the catalog.

See the "Metadata" tab of "portal_catalog".


Dieter



More information about the Zope mailing list