[Zope] ZDiscussions Problem under Zope 2.6.2b3
Dieter Maurer
dieter@handshake.de
Fri, 18 Jul 2003 21:32:06 +0200
Dennis Allison wrote at 2003-7-18 08:08 -0700:
> ....
> Error Type: AttributeError
> Error Value: LazyMap instance has no attribute 'threadMessageCount'
>
> Traceback (innermost last):
> Module ZPublisher.Publish, line 98, in publish
> Module ZPublisher.mapply, line 88, in mapply
> Module ZPublisher.Publish, line 39, in call_object
> Module OFS.DTMLMethod, line 126, in __call__
> Module DocumentTemplate.DT_String, line 474, in __call__
> Module DocumentTemplate.DT_In, line 604, in renderwb
> Module DocumentTemplate.DT_Util, line 201, in eval
> - __traceback_info__: id
> Module <string>, line 2, in f
> Module AccessControl.DTML, line 29, in guarded_getattr
> Module AccessControl.ZopeGuards, line 47, in guarded_getattr
> AttributeError: LazyMap instance has no attribute 'threadMessageCount'
It seems that your DTMLMethod performs a catalog query (this
returns a "LazyMap" instance) and tries to access
the "threadMessageCount" attribute on it.
Of course, this will not work.
Almost surely, you need to access a single hit (this is a BrainObject),
then call its method "getObject" (to get the true object) and
only then access "threadMessageCount".
Dieter